Fix warnings.

This commit is contained in:
Night Owl 2018-09-19 04:03:31 +05:00
parent 5823316fe9
commit be58a0c4da
11 changed files with 40 additions and 41 deletions

View File

@ -60,8 +60,7 @@ int CHudTimer::Draw( float flTime )
} }
if (smbSoundCounter == 5) //Note: the counter will still continue until 120 seconds turns into 119. if (smbSoundCounter == 5) //Note: the counter will still continue until 120 seconds turns into 119.
{ {
char * songchoice = "media/hurryup.mp3"; gEngfuncs.pfnPrimeMusicStream( "media/hurryup.mp3", 0 );
gEngfuncs.pfnPrimeMusicStream( songchoice, 0 );
//gMP3.PlayMP3NL( songchoice ); //gMP3.PlayMP3NL( songchoice );
} }
//Draw BG //Draw BG
@ -80,10 +79,10 @@ int CHudTimer::Draw( float flTime )
} }
if (smbSoundCounter >= 0 && g_iRoundtime > 120) //If server manually changed the round time or new round, Reset the sound timer. if (smbSoundCounter >= 0 && g_iRoundtime > 120) //If server manually changed the round time or new round, Reset the sound timer.
{ {
smbSoundCounter = 0; smbSoundCounter = 0;
} }
return 1; return 1;
} }

View File

@ -98,7 +98,7 @@ int CHud::Redraw( float flTime, int intermission )
int ranmus; int ranmus;
ranmus = gEngfuncs.pfnRandomLong( 0, 9 ); ranmus = gEngfuncs.pfnRandomLong( 0, 9 );
char *songchoice; const char *songchoice;
switch( ranmus ) switch( ranmus )
{ {

View File

@ -446,7 +446,7 @@ void Host_Say( edict_t *pEntity, int teamonly )
time_t tTime = time( 0 ); time_t tTime = time( 0 );
struct tm *stTimeNow = localtime( &tTime ); struct tm *stTimeNow = localtime( &tTime );
char *dd = "AM"; const char *dd = "AM";
if( stTimeNow->tm_hour > 11 ) if( stTimeNow->tm_hour > 11 )
{ {

View File

@ -2297,7 +2297,7 @@ void CEnvELight::SendData( void )
{ {
edict_t *pTarget = NULL; edict_t *pTarget = NULL;
if( pev->target != NULL ) if( pev->target != 0 )
{ {
pTarget = FIND_ENTITY_BY_TARGETNAME( NULL, STRING( pev->target ) ); pTarget = FIND_ENTITY_BY_TARGETNAME( NULL, STRING( pev->target ) );
m_fParentedElight = TRUE; m_fParentedElight = TRUE;
@ -2333,7 +2333,7 @@ void CEnvELight::SendData( void )
} }
MESSAGE_END(); MESSAGE_END();
if( m_iParentEntindex == NULL && m_fParentedElight ) if( m_iParentEntindex == 0 && m_fParentedElight )
m_iParentEntindex = ( ENTINDEX( pTarget ) + 0x1000 * pev->impulse ); m_iParentEntindex = ( ENTINDEX( pTarget ) + 0x1000 * pev->impulse );
m_fNotReloaded = TRUE; m_fNotReloaded = TRUE;

View File

@ -639,7 +639,7 @@ CGrenade *CGrenade::ShootJihad( entvars_t *pevOwner, Vector vecStart, Vector vec
pGrenade->pev->velocity = Vector( 0, 0, 0 ); pGrenade->pev->velocity = Vector( 0, 0, 0 );
} }
pGrenade->pev->sequence = 0.01; pGrenade->pev->sequence = 0;
pGrenade->pev->framerate = 1.0; pGrenade->pev->framerate = 1.0;
// Tumble through the air // Tumble through the air

View File

@ -68,12 +68,12 @@ BOOL skin_used[MAX_SKINS] = {
FALSE, FALSE, FALSE, FALSE, FALSE}; FALSE, FALSE, FALSE, FALSE, FALSE};
// store the names of the models... // store the names of the models...
char *bot_skins[MAX_SKINS] = { const char *bot_skins[MAX_SKINS] = {
"barney", "jamison", "gman", "gordon", "eva01", "barney", "jamison", "gman", "gordon", "eva01",
"hgrunt", "haruhi", "robo", "scientist", "vader"}; "hgrunt", "haruhi", "robo", "scientist", "vader"};
// store the player names for each of the models... // store the player names for each of the models...
char *bot_names[MAX_SKINS] = { const char *bot_names[MAX_SKINS] = {
"Barney", "Jamison_Trumpets", "G-Man", "Gordon", "Evangelion01", "Barney", "Jamison_Trumpets", "G-Man", "Gordon", "Evangelion01",
"H-Grunt", "Haruhi", "Robo", "Scientist", "DarthVader"}; "H-Grunt", "Haruhi", "Robo", "Scientist", "DarthVader"};
@ -87,9 +87,9 @@ float pause_time[5][2] = {
extern ammo_check_t ammo_check[]; extern ammo_check_t ammo_check[];
// sounds for TakeDamage speaking effects... // sounds for TakeDamage speaking effects...
char hgrunt_sounds[][30] = { HG_SND1, HG_SND2, HG_SND3, HG_SND4, HG_SND5 }; const char *hgrunt_sounds[] = { HG_SND1, HG_SND2, HG_SND3, HG_SND4, HG_SND5 };
char barney_sounds[][30] = { BA_SND1, BA_SND2, BA_SND3, BA_SND4, BA_SND5 }; const char *barney_sounds[] = { BA_SND1, BA_SND2, BA_SND3, BA_SND4, BA_SND5 };
char scientist_sounds[][30] = { SC_SND1, SC_SND2, SC_SND3, SC_SND4, SC_SND5 }; const char *scientist_sounds[] = { SC_SND1, SC_SND2, SC_SND3, SC_SND4, SC_SND5 };
LINK_ENTITY_TO_CLASS( bot, CBot ); LINK_ENTITY_TO_CLASS( bot, CBot );
@ -105,13 +105,13 @@ inline char *GET_INFOBUFFER( edict_t *e )
return (*g_engfuncs.pfnGetInfoKeyBuffer)( e ); return (*g_engfuncs.pfnGetInfoKeyBuffer)( e );
} }
inline char *GET_INFO_KEY_VALUE( char *infobuffer, char *key ) inline char *GET_INFO_KEY_VALUE( const char *infobuffer, const char *key )
{ {
return (g_engfuncs.pfnInfoKeyValue( infobuffer, key )); return (g_engfuncs.pfnInfoKeyValue( infobuffer, key ));
} }
inline void SET_CLIENT_KEY_VALUE( int clientIndex, char *infobuffer, inline void SET_CLIENT_KEY_VALUE( int clientIndex, const char *infobuffer,
char *key, char *value ) const char *key, const char *value )
{ {
(*g_engfuncs.pfnSetClientKeyValue)( clientIndex, infobuffer, key, value ); (*g_engfuncs.pfnSetClientKeyValue)( clientIndex, infobuffer, key, value );
} }

View File

@ -27,8 +27,8 @@
typedef struct // used in checking if bot can pick up ammo typedef struct // used in checking if bot can pick up ammo
{ {
char *ammo_name; const char *ammo_name;
char *weapon_name; const char *weapon_name;
int max_carry; int max_carry;
} ammo_check_t; } ammo_check_t;

View File

@ -113,9 +113,9 @@ ammo_check_t ammo_check[] = {
{"", 0, 0}}; {"", 0, 0}};
// sounds for Bot taunting after a kill... // sounds for Bot taunting after a kill...
char barney_taunt[][30] = { BA_TNT1, BA_TNT2, BA_TNT3, BA_TNT4, BA_TNT5 }; const char *barney_taunt[] = { BA_TNT1, BA_TNT2, BA_TNT3, BA_TNT4, BA_TNT5 };
char scientist_taunt[][30] = { SC_TNT1, SC_TNT2, SC_TNT3, SC_TNT4, SC_TNT5 }; const char *scientist_taunt[] = { SC_TNT1, SC_TNT2, SC_TNT3, SC_TNT4, SC_TNT5 };
char vader_taunt[][30] = { DV_TNT1, DV_TNT2, DV_TNT3, DV_TNT4, DV_TNT5 }; const char *vader_taunt[] = { DV_TNT1, DV_TNT2, DV_TNT3, DV_TNT4, DV_TNT5 };
CBaseEntity * CBot::BotFindEnemy( void ) CBaseEntity * CBot::BotFindEnemy( void )

View File

@ -153,7 +153,7 @@ void CGrinman :: StartTask( Task_t *pTask )
switch( pTask->iTask ) switch( pTask->iTask )
{ {
case TASK_WAIT: case TASK_WAIT:
if (m_hPlayer == NULL) if (m_hPlayer == 0)
{ {
m_hPlayer = UTIL_FindEntityByClassname( NULL, "player" ); m_hPlayer = UTIL_FindEntityByClassname( NULL, "player" );
} }
@ -168,7 +168,7 @@ void CGrinman :: RunTask( Task_t *pTask )
{ {
case TASK_WAIT: case TASK_WAIT:
// look at who I'm talking to // look at who I'm talking to
if (m_flTalkTime > gpGlobals->time && m_hTalkTarget != NULL) if (m_flTalkTime > gpGlobals->time && m_hTalkTarget != 0)
{ {
float yaw = VecToYaw(m_hTalkTarget->pev->origin - pev->origin) - pev->angles.y; float yaw = VecToYaw(m_hTalkTarget->pev->origin - pev->origin) - pev->angles.y;
@ -179,7 +179,7 @@ void CGrinman :: RunTask( Task_t *pTask )
SetBoneController( 0, yaw ); SetBoneController( 0, yaw );
} }
// look at player, but only if playing a "safe" idle animation // look at player, but only if playing a "safe" idle animation
else if (m_hPlayer != NULL && pev->sequence == 0) else if (m_hPlayer != 0 && pev->sequence == 0)
{ {
float yaw = VecToYaw(m_hPlayer->pev->origin - pev->origin) - pev->angles.y; float yaw = VecToYaw(m_hPlayer->pev->origin - pev->origin) - pev->angles.y;
@ -242,4 +242,4 @@ void CGrinman::PlayScriptedSentence( const char *pszSentence, float duration, fl
m_flTalkTime = gpGlobals->time + duration; m_flTalkTime = gpGlobals->time + duration;
m_hTalkTarget = pListener; m_hTalkTarget = pListener;
} }

View File

@ -326,16 +326,16 @@ int CMonsterplay::iKillforMonster(const char *classname)
const char *CMonsterplay::PrepareMonsterName( const char *monster_name ) const char *CMonsterplay::PrepareMonsterName( const char *monster_name )
{ {
// Hack to fix name change // Hack to fix name change
char *gayglenn = "Gay Glenn"; const char *gayglenn = "Gay Glenn";
char *barney = "Barney"; const char *barney = "Barney";
char *scientist = "Scientist"; const char *scientist = "Scientist";
char *xmast = "X-Mas Tree"; const char *xmast = "X-Mas Tree";
char *sinistar = "Sinistar"; const char *sinistar = "Sinistar";
char *cwc = "Chris-Chan"; const char *cwc = "Chris-Chan";
char *zombie = "Zombie"; const char *zombie = "Zombie";
char *controller = "Alien Controller"; const char *controller = "Alien Controller";
char *bullsquid = "Bull Squid"; const char *bullsquid = "Bull Squid";
char *grinman = "Grinman"; const char *grinman = "Grinman";
monster_name += 8; monster_name += 8;

View File

@ -201,9 +201,9 @@ typedef struct enginefuncs_s
void (*pfnRunPlayerMove)( edict_t *fakeclient, const float *viewangles, float forwardmove, float sidemove, float upmove, unsigned short buttons, byte impulse, byte msec ); void (*pfnRunPlayerMove)( edict_t *fakeclient, const float *viewangles, float forwardmove, float sidemove, float upmove, unsigned short buttons, byte impulse, byte msec );
int (*pfnNumberOfEntities)( void ); int (*pfnNumberOfEntities)( void );
char* (*pfnGetInfoKeyBuffer)( edict_t *e ); // passing in NULL gets the serverinfo char* (*pfnGetInfoKeyBuffer)( edict_t *e ); // passing in NULL gets the serverinfo
char* (*pfnInfoKeyValue)( char *infobuffer, const char *key ); char* (*pfnInfoKeyValue)( const char *infobuffer, const char *key );
void (*pfnSetKeyValue)( char *infobuffer, const char *key, const char *value ); void (*pfnSetKeyValue)( const char *infobuffer, const char *key, const char *value );
void (*pfnSetClientKeyValue)( int clientIndex, char *infobuffer, const char *key, const char *value ); void (*pfnSetClientKeyValue)( int clientIndex, const char *infobuffer, const char *key, const char *value );
int (*pfnIsMapValid)( const char *filename ); int (*pfnIsMapValid)( const char *filename );
void (*pfnStaticDecal)( const float *origin, int decalIndex, int entityIndex, int modelIndex ); void (*pfnStaticDecal)( const float *origin, int decalIndex, int entityIndex, int modelIndex );
int (*pfnPrecacheGeneric)( const char *s ); int (*pfnPrecacheGeneric)( const char *s );