Browse Source

Fix some warnings.

bubblemod
Night Owl 8 years ago
parent
commit
733c6fce9d
  1. 8
      dlls/bubblemod/BMOD_egon.cpp
  2. 9
      dlls/bubblemod/BMOD_messaging.cpp
  3. 2
      dlls/bubblemod/BMOD_snarkmine.cpp
  4. 2
      dlls/bubblemod/BMOD_tripmines.cpp
  5. 2
      dlls/bubblemod/BMOD_zapgunrift.cpp
  6. 16
      dlls/multiplay_gamerules.cpp
  7. 1
      dlls/satchel.cpp
  8. 2
      dlls/triggers.cpp
  9. 4
      dlls/weapons.cpp

8
dlls/bubblemod/BMOD_egon.cpp

@ -482,14 +482,18 @@ void CEgon::FireHeal( void ) { @@ -482,14 +482,18 @@ void CEgon::FireHeal( void ) {
while ((pEntity = UTIL_FindEntityInSphere( pEntity, vecOrigSrc, BUBBLE_HEAL_RADIUS )) != NULL)
{
if (pEntity->IsPlayer())
if (m_pPlayer->m_RuneFlags == RUNE_BATTERY) {
{
if (m_pPlayer->m_RuneFlags == RUNE_BATTERY)
{
pEntity->pev->armorvalue += BUBBLE_HEAL_AMT;
if (pEntity->pev->armorvalue > 100)
pEntity->pev->armorvalue = 100;
}
else {
else
{
pEntity->TakeHealth(BUBBLE_HEAL_AMT, DMG_GENERIC);
}
}
UTIL_ScreenFade( pEntity, Vector(0,128,255), 2, 0.5, 200, FFADE_IN );
}

9
dlls/bubblemod/BMOD_messaging.cpp

@ -45,7 +45,7 @@ extern cvar_t fraglimit; @@ -45,7 +45,7 @@ extern cvar_t fraglimit;
void PrintMessage( CBaseEntity *pEnt, int iChannel, Vector vecColor, Vector vecTime, char *msg)
{
char szText[256];
hudtextparms_t hText;
hudtextparms_t hText = {0};
if (!strcmp("SPEC", msg))
{
@ -70,12 +70,11 @@ void PrintMessage( CBaseEntity *pEnt, int iChannel, Vector vecColor, Vector vecT @@ -70,12 +70,11 @@ void PrintMessage( CBaseEntity *pEnt, int iChannel, Vector vecColor, Vector vecT
(int)fraglimit.value
);
}
else {
sprintf(szText, msg);
else
{
sprintf(szText, "%s",msg);
}
memset(&hText, 0, sizeof(hText));
switch (iChannel)
{
case BMOD_CHAN_INFO:

2
dlls/bubblemod/BMOD_snarkmine.cpp

@ -451,7 +451,7 @@ BOOL CTripSnarkGrenade::IsSpawnMine() @@ -451,7 +451,7 @@ BOOL CTripSnarkGrenade::IsSpawnMine()
CBaseEntity *pEntity = NULL;
TraceResult tr;
Vector vecSpot, vecTop;
Vector vecSpot;
Vector vecSrc = pev->origin;
float flRadius = 375;

2
dlls/bubblemod/BMOD_tripmines.cpp

@ -42,7 +42,7 @@ BOOL CTripmineGrenade::BMOD_IsSpawnMine() @@ -42,7 +42,7 @@ BOOL CTripmineGrenade::BMOD_IsSpawnMine()
BOOL result = FALSE;
CBaseEntity *pEntity = NULL;
TraceResult tr;
Vector vecSpot, vecTop;
Vector vecSpot;
Vector vecSrc = pev->origin;
float flRadius = pev->dmg * 2.5;

2
dlls/bubblemod/BMOD_zapgunrift.cpp

@ -363,7 +363,7 @@ void CZapBounce::BounceThink( void ) @@ -363,7 +363,7 @@ void CZapBounce::BounceThink( void )
pRift->m_fDamage = m_fDamage;
pRift->m_iBounce = m_iBounce;
pRift->m_bFirstZap = FALSE;
pRift->pev->nextthink = gpGlobals->time + RANDOM_LONG(.2,.3);
pRift->pev->nextthink = gpGlobals->time + RANDOM_FLOAT( 0.2, 0.3 );
}
}

16
dlls/multiplay_gamerules.cpp

@ -132,7 +132,7 @@ CHalfLifeMultiplay::CHalfLifeMultiplay() @@ -132,7 +132,7 @@ CHalfLifeMultiplay::CHalfLifeMultiplay()
strcpy( bmodcfgfile, CVAR_GET_STRING( "bm_map" ) );
strcat( bmodcfgfile, ".cfg" );
if( bmodcfgfile && bmodcfgfile[0] )
if( bmodcfgfile[0] )
{
char szCommand[256];
@ -1045,13 +1045,13 @@ void CHalfLifeMultiplay::DeathNotice( CBasePlayer *pVictim, entvars_t *pKiller, @@ -1045,13 +1045,13 @@ void CHalfLifeMultiplay::DeathNotice( CBasePlayer *pVictim, entvars_t *pKiller,
weapon_name = STRING( pVictim->m_pActiveItem->pev->classname );
// Hack to fix name change
char *tau = "tau_cannon";
char *gluon = "gluon gun";
char *zapgun = "zapgun";
char *multizapper = "multizapper";
char *squidspit = "squidspit";
char *freezeray = "freezeray";
char *snarklauncher = "snarklauncher";
tau = "tau_cannon";
gluon = "gluon gun";
zapgun = "zapgun";
multizapper = "multizapper";
squidspit = "squidspit";
freezeray = "freezeray";
snarklauncher = "snarklauncher";
char *rpg = "rpg_rocket";
char *hand_grenade = "hand_grenade";

1
dlls/satchel.cpp

@ -509,7 +509,6 @@ BOOL CSatchelCharge::IsSpawnSatchel() @@ -509,7 +509,6 @@ BOOL CSatchelCharge::IsSpawnSatchel()
BOOL result = FALSE;
CBaseEntity *pEntity = NULL;
TraceResult tr;
Vector vecTop;
Vector vecSrc = pev->origin;
int bInWater = ( UTIL_PointContents( vecSrc ) == CONTENTS_WATER );

2
dlls/triggers.cpp

@ -887,7 +887,7 @@ void CBaseTrigger::HurtTouch( CBaseEntity *pOther ) @@ -887,7 +887,7 @@ void CBaseTrigger::HurtTouch( CBaseEntity *pOther )
if( !strcmp( STRING( pOther->pev->classname ), "rune" ) )
{
(CRune*)pOther->Respawn();
pOther->Respawn();
}
if( !pOther->pev->takedamage )

4
dlls/weapons.cpp

@ -1317,9 +1317,9 @@ void CWeaponBox::Touch( CBaseEntity *pOther ) @@ -1317,9 +1317,9 @@ void CWeaponBox::Touch( CBaseEntity *pOther )
if( pItem->m_iId == WEAPON_CROWBAR )
{
// check if the player already has this weapon
for( int i = 0; i < MAX_ITEM_TYPES; i++ )
for( int j = 0; j < MAX_ITEM_TYPES; j++ )
{
CBasePlayerItem *it = pPlayer->m_rgpPlayerItems[i];
CBasePlayerItem *it = pPlayer->m_rgpPlayerItems[j];
while( it != NULL )
{
if( it->m_iId == WEAPON_CROWBAR )

Loading…
Cancel
Save