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 ) {
while ((pEntity = UTIL_FindEntityInSphere( pEntity, vecOrigSrc, BUBBLE_HEAL_RADIUS )) != NULL) while ((pEntity = UTIL_FindEntityInSphere( pEntity, vecOrigSrc, BUBBLE_HEAL_RADIUS )) != NULL)
{ {
if (pEntity->IsPlayer()) if (pEntity->IsPlayer())
if (m_pPlayer->m_RuneFlags == RUNE_BATTERY) { {
if (m_pPlayer->m_RuneFlags == RUNE_BATTERY)
{
pEntity->pev->armorvalue += BUBBLE_HEAL_AMT; pEntity->pev->armorvalue += BUBBLE_HEAL_AMT;
if (pEntity->pev->armorvalue > 100) if (pEntity->pev->armorvalue > 100)
pEntity->pev->armorvalue = 100; pEntity->pev->armorvalue = 100;
} }
else { else
{
pEntity->TakeHealth(BUBBLE_HEAL_AMT, DMG_GENERIC); pEntity->TakeHealth(BUBBLE_HEAL_AMT, DMG_GENERIC);
} }
}
UTIL_ScreenFade( pEntity, Vector(0,128,255), 2, 0.5, 200, FFADE_IN ); 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;
void PrintMessage( CBaseEntity *pEnt, int iChannel, Vector vecColor, Vector vecTime, char *msg) void PrintMessage( CBaseEntity *pEnt, int iChannel, Vector vecColor, Vector vecTime, char *msg)
{ {
char szText[256]; char szText[256];
hudtextparms_t hText; hudtextparms_t hText = {0};
if (!strcmp("SPEC", msg)) if (!strcmp("SPEC", msg))
{ {
@ -70,12 +70,11 @@ void PrintMessage( CBaseEntity *pEnt, int iChannel, Vector vecColor, Vector vecT
(int)fraglimit.value (int)fraglimit.value
); );
} }
else { else
sprintf(szText, msg); {
sprintf(szText, "%s",msg);
} }
memset(&hText, 0, sizeof(hText));
switch (iChannel) switch (iChannel)
{ {
case BMOD_CHAN_INFO: case BMOD_CHAN_INFO:

2
dlls/bubblemod/BMOD_snarkmine.cpp

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

2
dlls/bubblemod/BMOD_tripmines.cpp

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

2
dlls/bubblemod/BMOD_zapgunrift.cpp

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

1
dlls/satchel.cpp

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

2
dlls/triggers.cpp

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

4
dlls/weapons.cpp

@ -1317,9 +1317,9 @@ void CWeaponBox::Touch( CBaseEntity *pOther )
if( pItem->m_iId == WEAPON_CROWBAR ) if( pItem->m_iId == WEAPON_CROWBAR )
{ {
// check if the player already has this weapon // 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 ) while( it != NULL )
{ {
if( it->m_iId == WEAPON_CROWBAR ) if( it->m_iId == WEAPON_CROWBAR )

Loading…
Cancel
Save