Browse Source

Fix warnings.

bubblemod
Night Owl 7 years ago
parent
commit
7b66e7aaa3
  1. 2
      dlls/bubblemod/BMOD_CameraPoint.cpp
  2. 2
      dlls/bubblemod/BMOD_flyingcrowbar.cpp
  3. 2
      dlls/bubblemod/BMOD_messaging.cpp
  4. 2
      dlls/bubblemod/BMOD_messaging.h
  5. 28
      dlls/bubblemod/BMOD_player.cpp
  6. 2
      dlls/bubblemod/BMOD_rune.h
  7. 6
      dlls/bubblemod/BMOD_snarkmine.cpp
  8. 4
      dlls/bubblemod/BMOD_util.cpp
  9. 8
      dlls/multiplay_gamerules.cpp
  10. 2
      dlls/squeakgrenade.cpp
  11. 2
      dlls/util.h

2
dlls/bubblemod/BMOD_CameraPoint.cpp

@ -64,7 +64,7 @@ void CCamPoint::Think( void ) @@ -64,7 +64,7 @@ void CCamPoint::Think( void )
|| !m_pOwner->m_bIsConnected
|| !m_pOwner->m_bTypeMode
|| m_pOwner->pev->effects & EF_NODRAW
|| (STRING(m_pOwner->pev->netname)[0] == 0)
|| ( ( STRING( m_pOwner->pev->netname ) )[0] == 0 )
) {
// UTIL_ClientPrintAll( HUD_PRINTTALK, "<SERVER> Camera point destroyed.\n");
UTIL_Remove( this );

2
dlls/bubblemod/BMOD_flyingcrowbar.cpp

@ -92,7 +92,7 @@ void CFlyingCrowbar::SpinTouch( CBaseEntity *pOther ) @@ -92,7 +92,7 @@ void CFlyingCrowbar::SpinTouch( CBaseEntity *pOther )
ClearMultiDamage( );
pOther->TraceAttack(pev, 90, pev->velocity.Normalize(), &tr,
DMG_NEVERGIB );
if (m_hOwner != NULL)
if( m_hOwner != 0 )
ApplyMultiDamage( pev, m_hOwner->pev );
else
ApplyMultiDamage( pev, pev );

2
dlls/bubblemod/BMOD_messaging.cpp

@ -42,7 +42,7 @@ extern cvar_t fraglimit; @@ -42,7 +42,7 @@ extern cvar_t fraglimit;
// Special msg values:
// "SPEC" - spectator message.
//
void PrintMessage( CBaseEntity *pEnt, int iChannel, Vector vecColor, Vector vecTime, char *msg)
void PrintMessage( CBaseEntity *pEnt, int iChannel, Vector vecColor, Vector vecTime, const char *msg )
{
char szText[256];
hudtextparms_t hText = {0};

2
dlls/bubblemod/BMOD_messaging.h

@ -39,6 +39,6 @@ @@ -39,6 +39,6 @@
#define BMOD_CHAN_COUNTDOWN 3
#define BMOD_CHAN_WEAPON 4
void PrintMessage( CBaseEntity *pEnt, int iChannel, Vector vecColor, Vector vecTime, char *msg);
void PrintMessage( CBaseEntity *pEnt, int iChannel, Vector vecColor, Vector vecTime, const char *msg);
#endif

28
dlls/bubblemod/BMOD_player.cpp

@ -65,7 +65,7 @@ void CBasePlayer::StartObserver( Vector vecPosition, Vector vecViewAngle ) @@ -65,7 +65,7 @@ void CBasePlayer::StartObserver( Vector vecPosition, Vector vecViewAngle )
m_pActiveItem->Holster( );
// ?? Let go of tanks?
if ( m_pTank != NULL )
if( m_pTank != 0 )
{
m_pTank->Use( this, this, USE_OFF, 0 );
m_pTank = NULL;
@ -190,7 +190,7 @@ void CBasePlayer::Observer_FindNextPlayer( bool bReverse ) @@ -190,7 +190,7 @@ void CBasePlayer::Observer_FindNextPlayer( bool bReverse )
// Don't spec observers or invisible players or defunct players
if ( ((CBasePlayer*)pEnt)->IsObserver()
|| (pEnt->pev->effects & EF_NODRAW)
|| (STRING(pEnt->pev->netname)[0] == 0)
|| ( ( STRING( pEnt->pev->netname ) )[0] == 0 )
|| (!((CBasePlayer*)pEnt)->m_bIsConnected)
)
continue;
@ -272,7 +272,7 @@ void CBasePlayer::Observer_HandleButtons() @@ -272,7 +272,7 @@ void CBasePlayer::Observer_HandleButtons()
m_afButtonReleased = 0;
pev->impulse = 0;
if ((m_hObserverTarget != NULL) && (m_hObserverTarget->IsPlayer()) && (pev->iuser1 == OBS_CHASE_FREE))
if ((m_hObserverTarget != 0) && (m_hObserverTarget->IsPlayer()) && (pev->iuser1 == OBS_CHASE_FREE))
{
pev->origin = m_hObserverTarget->pev->origin;
pev->velocity = m_hObserverTarget->pev->velocity;
@ -304,7 +304,7 @@ void CBasePlayer::Observer_SetMode( int iMode ) @@ -304,7 +304,7 @@ void CBasePlayer::Observer_SetMode( int iMode )
if ( iMode == OBS_CHASE_LOCKED )
{
// If changing from Roaming, or starting observing, make sure there is a target
if ( m_hObserverTarget == NULL )
if ( m_hObserverTarget == 0 )
Observer_FindNextPlayer( false );
if (m_hObserverTarget)
@ -589,25 +589,25 @@ void CBasePlayer::BMOD_Identify( void ) @@ -589,25 +589,25 @@ void CBasePlayer::BMOD_Identify( void )
strcat(szExtra, "\nTyping! DO NOT SHOOT!");
}
CBasePlayer *pPlayer = (CBasePlayer *)pOther;
CBasePlayer *pOtherPlayer = (CBasePlayer *)pOther;
if (IsObserver())
ClientPrint( pev, HUD_PRINTCENTER, UTIL_VarArgs ("-%s-\n(%s) %i / %i%s",
STRING( pPlayer->pev->netname ),
g_engfuncs.pfnInfoKeyValue( g_engfuncs.pfnGetInfoKeyBuffer( pPlayer->edict() ), "model" ),
(int)pPlayer->pev->health,
(int)pPlayer->pev->armorvalue,
STRING( pOtherPlayer->pev->netname ),
g_engfuncs.pfnInfoKeyValue( g_engfuncs.pfnGetInfoKeyBuffer( pOtherPlayer->edict() ), "model" ),
(int)pOtherPlayer->pev->health,
(int)pOtherPlayer->pev->armorvalue,
szExtra
) );
else if ( g_pGameRules->PlayerRelationship( pOther, this ) == GR_TEAMMATE )
ClientPrint( pev, HUD_PRINTCENTER, UTIL_VarArgs ("-%s-\n%i / %i",
STRING( pPlayer->pev->netname ),
(int)pPlayer->pev->health,
(int)pPlayer->pev->armorvalue)
STRING( pOtherPlayer->pev->netname ),
(int)pOtherPlayer->pev->health,
(int)pOtherPlayer->pev->armorvalue)
);
else
ClientPrint( pev, HUD_PRINTCENTER, UTIL_VarArgs ("-%s-\n(%s)%s",
STRING( pPlayer->pev->netname ),
g_engfuncs.pfnInfoKeyValue( g_engfuncs.pfnGetInfoKeyBuffer( pPlayer->edict() ), "model" ),
STRING( pOtherPlayer->pev->netname ),
g_engfuncs.pfnInfoKeyValue( g_engfuncs.pfnGetInfoKeyBuffer( pOtherPlayer->edict() ), "model" ),
szExtra
) );

2
dlls/bubblemod/BMOD_rune.h

@ -40,7 +40,7 @@ public: @@ -40,7 +40,7 @@ public:
void EXPORT MaterializeRandom( void );
virtual BOOL MyTouch( CBasePlayer *pPlayer ) { EMIT_SOUND( pPlayer->edict(), CHAN_ITEM, "items/gunpickup2.wav", 1, ATTN_NORM ); return TRUE; };
BOOL IsRune( void ) { return TRUE; }
virtual char* RuneName ( void ) { return "Generic Rune"; }
virtual const char* RuneName ( void ) { return "Generic Rune"; }
BOOL m_randomize;
Vector m_vRuneColor;

6
dlls/bubblemod/BMOD_snarkmine.cpp

@ -50,7 +50,7 @@ enum tripmine_e { @@ -50,7 +50,7 @@ enum tripmine_e {
TRIPMINE_HOLSTER,
TRIPMINE_DRAW,
TRIPMINE_WORLD,
TRIPMINE_GROUND,
TRIPMINE_GROUND
};
LINK_ENTITY_TO_CLASS( monster_tripsnark, CTripSnarkGrenade );
@ -149,7 +149,7 @@ void CTripSnarkGrenade :: PowerupThink( void ) @@ -149,7 +149,7 @@ void CTripSnarkGrenade :: PowerupThink( void )
{
TraceResult tr;
if (m_hOwner == NULL)
if( m_hOwner == 0 )
{
// find an owner
edict_t *oldowner = pev->owner;
@ -289,7 +289,7 @@ void CTripSnarkGrenade :: BeamBreakThink( void ) @@ -289,7 +289,7 @@ void CTripSnarkGrenade :: BeamBreakThink( void )
}
else
{
if (m_hOwner == NULL)
if( m_hOwner == 0 )
bBlowup = 1;
else if( m_posOwner != m_hOwner->pev->origin )
bBlowup = 1;

4
dlls/bubblemod/BMOD_util.cpp

@ -216,7 +216,7 @@ BOOL UTIL_OBB_PointTest(Vector vecSrc, Vector boxP, Vector boxE) @@ -216,7 +216,7 @@ BOOL UTIL_OBB_PointTest(Vector vecSrc, Vector boxP, Vector boxE)
return TRUE;
}
void UTIL_SpeakAll( char *message )
void UTIL_SpeakAll( const char *message )
{
char text[256];
strcpy(text, "speak \"");
@ -491,7 +491,7 @@ void UTIL_SayTime( void ) { @@ -491,7 +491,7 @@ void UTIL_SayTime( void ) {
hour = hour > 12 ? hour - 12 : hour;
hour = hour == 0 ? 12 : hour;
int min = adjustedTime->tm_min;
char *ampm = "AM";
const char *ampm = "AM";
if (adjustedTime->tm_hour > 11)
ampm = "PM";

8
dlls/multiplay_gamerules.cpp

@ -1007,12 +1007,12 @@ void CHalfLifeMultiplay::DeathNotice( CBasePlayer *pVictim, entvars_t *pKiller, @@ -1007,12 +1007,12 @@ void CHalfLifeMultiplay::DeathNotice( CBasePlayer *pVictim, entvars_t *pKiller,
// BMOD Start - match kills.
// tag kills where killer matched weapons with victim.
if( bm_matchkills.value && strcmp( killer_weapon_name, "tripmine" ) && strcmp( killer_weapon_name, "snark" ) &&
if( ( bm_matchkills.value && strcmp( killer_weapon_name, "tripmine" ) && strcmp( killer_weapon_name, "snark" ) &&
( pVictim->m_pActiveItem &&
( (CBasePlayer *)Killer )->m_pActiveItem &&
!strcmp( STRING( ( (CBasePlayer *)Killer )->m_pActiveItem->pev->classname ),
STRING( pVictim->m_pActiveItem->pev->classname ) ) &&
( (CBasePlayer *)Killer )->m_RuneFlags == RUNE_NONE )
( (CBasePlayer *)Killer )->m_RuneFlags == RUNE_NONE ) )
|| // OR...
( !strcmp( killer_weapon_name, "flying_crowbar" ) &&
( !pVictim->m_pActiveItem ||
@ -1041,8 +1041,8 @@ void CHalfLifeMultiplay::DeathNotice( CBasePlayer *pVictim, entvars_t *pKiller, @@ -1041,8 +1041,8 @@ void CHalfLifeMultiplay::DeathNotice( CBasePlayer *pVictim, entvars_t *pKiller,
weapon_name = STRING( pVictim->m_pActiveItem->pev->classname );
// Hack to fix name change
char *rpg = "rpg_rocket";
char *hand_grenade = "hand_grenade";
const char *rpg = "rpg_rocket";
const char *hand_grenade = "hand_grenade";
// strip the monster_* or weapon_* from the classname
if( strncmp( weapon_name, "weapon_", 7 ) == 0 )

2
dlls/squeakgrenade.cpp

@ -230,7 +230,7 @@ void CSqueakGrenade::HuntThink( void ) @@ -230,7 +230,7 @@ void CSqueakGrenade::HuntThink( void )
m_hEnemy = BMOD_BestVisibleEnemy();
}
if( m_hEnemy!= NULL && m_hEnemy->IsPlayer() )
if( m_hEnemy!= 0 && m_hEnemy->IsPlayer() )
{
CBasePlayer* pPlayer = (CBasePlayer*)( (CBaseEntity *)m_hEnemy );
if( pPlayer->BMOD_IsTyping() )

2
dlls/util.h

@ -587,7 +587,7 @@ CBasePlayer* UTIL_CastPlayer( int index ); @@ -587,7 +587,7 @@ CBasePlayer* UTIL_CastPlayer( int index );
BOOL UTIL_OBB_LineTest( Vector vecSrc, Vector vecDst, Vector boxP, Vector boxE );
BOOL UTIL_OBB_PointTest( Vector vecSrc, Vector boxP, Vector boxE );
void UTIL_SpeakAll( char *message );
void UTIL_SpeakAll( const char *message );
char *UTIL_CountVotes( void );
void UTIL_SpeakBadWeapon( void );
char *UTIL_CountVotes( void );

Loading…
Cancel
Save