Fix some warnings.

This commit is contained in:
Night Owl 2017-06-13 01:24:49 +05:00
parent a2e6f71412
commit 7936f4d80e
11 changed files with 19 additions and 21 deletions

View File

@ -210,9 +210,7 @@ void CHudHealth::GetPainColor( int &r, int &g, int &b )
int CHudHealth::Draw( float flTime )
{
int r, g, b;
int a = 0, x, y;
int HealthWidth;
wrect_t rc;
if( ( gHUD.m_iHideHUDDisplay & HIDEHUD_HEALTH ) || gEngfuncs.IsSpectateOnly() )
return 1;

View File

@ -145,7 +145,7 @@ public:
float m_fFade;
private:
int Ranks[1000];
int Ranks[1001];
int m_HUD_codrank;
int m_HUD_codrank2;
wrect_t *m_prc2;

View File

@ -562,7 +562,7 @@ void ClientCommand( edict_t *pEntity )
else if( FStrEq( pcmd, "evangelion" ) )
{
char text[256];
sprintf( text, "Evangelion Unit 01 is active!\n", STRING( pEntity->v.netname ) );
sprintf( text, "%c%s: Evangelion Unit 01 is active!\n", 2, STRING( pEntity->v.netname ) );
MESSAGE_BEGIN( MSG_ALL, gmsgSayText, NULL );
WRITE_BYTE( ENTINDEX( pEntity ) );
WRITE_STRING( text );
@ -1136,7 +1136,7 @@ void StartFrame( void )
if( IS_DEDICATED_SERVER() )
{
sprintf( msg, "min_bots set to %d\n", min_bots );
printf( msg );
printf( "%s", msg );
}
}
else if( strcmp( cmd, "max_bots" ) == 0 )
@ -1149,7 +1149,7 @@ void StartFrame( void )
if( IS_DEDICATED_SERVER() )
{
sprintf( msg, "max_bots set to %d\n", max_bots );
printf( msg );
printf( "%s", msg );
}
}
else if( strcmp( cmd, "pause" ) == 0 )
@ -1163,7 +1163,7 @@ void StartFrame( void )
ALERT( at_console, msg );
if( IS_DEDICATED_SERVER() )
printf( msg );
printf( "%s", msg );
SERVER_COMMAND( server_cmd );
}

View File

@ -225,7 +225,7 @@ void BotCreate(const char *skin, const char *name, const char *skill)
sprintf( err_msg, "model \"%s\" is unknown.\n", c_skin );
UTIL_ClientPrintAll( HUD_PRINTNOTIFY, err_msg );
if (IS_DEDICATED_SERVER())
printf(err_msg);
printf( "%s", err_msg );
UTIL_ClientPrintAll( HUD_PRINTNOTIFY,
"use barney, gina, gman, gordon, helmet, hgrunt,\n");
@ -2129,4 +2129,4 @@ void CBot::BotThink( void )
0, 0, pev->button, 0,
gpGlobals->frametime * 1000 );
// TheFatal - END
}
}

View File

@ -262,7 +262,7 @@ CBaseEntity * CBot::BotFindEnemy( void )
else
{
CBaseEntity *pMonster = NULL;
while(pMonster = UTIL_FindEntityByClassname(pMonster, CVAR_GET_STRING("bot_target_ent"))) //For now, bots only hunt for Gay Glenn.
while((pMonster = UTIL_FindEntityByClassname(pMonster, CVAR_GET_STRING("bot_target_ent")))) //For now, bots only hunt for Gay Glenn.
{
vecEnd = pMonster->EyePosition();

View File

@ -50,7 +50,7 @@ void CCodplay::PlayerSpawn( CBasePlayer *pPlayer )
edict_t *pClient = g_engfuncs.pfnPEntityOfEntIndex( 1 );
while ( pWeaponEntity = UTIL_FindEntityByClassname( pWeaponEntity, "game_player_equip" ))
while( ( pWeaponEntity = UTIL_FindEntityByClassname( pWeaponEntity, "game_player_equip" ) ) )
{
pWeaponEntity->Touch( pPlayer );
addDefault = FALSE;
@ -128,4 +128,4 @@ void CCodplay::PlayerKilled( CBasePlayer *pVictim, entvars_t *pKiller, entvars_t
DeactivateSatchels( pVictim );
}
#endif
}
}

View File

@ -34,7 +34,7 @@ void CCoopplay::PlayerSpawn( CBasePlayer *pPlayer )
edict_t *pClient = g_engfuncs.pfnPEntityOfEntIndex( 1 );
while ( pWeaponEntity = UTIL_FindEntityByClassname( pWeaponEntity, "game_player_equip" ))
while( ( pWeaponEntity = UTIL_FindEntityByClassname( pWeaponEntity, "game_player_equip" ) ) )
{
pWeaponEntity->Touch( pPlayer );
addDefault = FALSE;
@ -82,4 +82,4 @@ void CCoopplay::PlayerKilled( CBasePlayer *pVictim, entvars_t *pKiller, entvars_
BOOL CCoopplay::IsCoOp( void )
{
return TRUE;
}
}

View File

@ -50,7 +50,7 @@ void CHeavyRainplay::PlayerSpawn( CBasePlayer *pPlayer )
edict_t *pClient = g_engfuncs.pfnPEntityOfEntIndex( 1 );
while ( pWeaponEntity = UTIL_FindEntityByClassname( pWeaponEntity, "game_player_equip" ))
while( ( pWeaponEntity = UTIL_FindEntityByClassname( pWeaponEntity, "game_player_equip" ) ) )
{
pWeaponEntity->Touch( pPlayer );
addDefault = FALSE;
@ -126,4 +126,4 @@ void CHeavyRainplay::PlayerKilled( CBasePlayer *pVictim, entvars_t *pKiller, ent
int CHeavyRainplay::JasonsStolen(int jason)
{
return jason; //JASON! I found you!
}
}

View File

@ -202,7 +202,7 @@ void CMonsterplay::PlayerSpawn( CBasePlayer *pPlayer )
edict_t *pClient = g_engfuncs.pfnPEntityOfEntIndex( 1 );
while ( pWeaponEntity = UTIL_FindEntityByClassname( pWeaponEntity, "game_player_equip" ))
while( ( pWeaponEntity = UTIL_FindEntityByClassname( pWeaponEntity, "game_player_equip" ) ) )
{
pWeaponEntity->Touch( pPlayer );
addDefault = FALSE;

View File

@ -597,7 +597,7 @@ void CHalfLifeShytplay::PlayerSpawn( CBasePlayer *pPlayer )
// CBasePlayer *pPlayer;
while ( pWeaponEntity = UTIL_FindEntityByClassname( pWeaponEntity, "game_player_equip" ))
while( ( pWeaponEntity = UTIL_FindEntityByClassname( pWeaponEntity, "game_player_equip" ) ) )
{
pWeaponEntity->Touch( pPlayer );
addDefault = FALSE;

View File

@ -40,7 +40,7 @@ void CTestplay::PlayerSpawn( CBasePlayer *pPlayer )
edict_t *pClient = g_engfuncs.pfnPEntityOfEntIndex( 1 );
while ( pWeaponEntity = UTIL_FindEntityByClassname( pWeaponEntity, "game_player_equip" ))
while( ( pWeaponEntity = UTIL_FindEntityByClassname( pWeaponEntity, "game_player_equip" ) ) )
{
pWeaponEntity->Touch( pPlayer );
addDefault = FALSE;
@ -118,4 +118,4 @@ void CTestplay::PlayerKilled( CBasePlayer *pVictim, entvars_t *pKiller, entvars_
BOOL CTestplay::IsTest( void )
{
return TRUE;
}
}