diff --git a/dlls/bot/bot.cpp b/dlls/bot/bot.cpp index 06eabc05..5123ccca 100644 --- a/dlls/bot/bot.cpp +++ b/dlls/bot/bot.cpp @@ -64,12 +64,12 @@ BOOL skin_used[MAX_SKINS] = { FALSE, FALSE, FALSE, FALSE, FALSE}; // store the names of the models... -char *bot_skins[MAX_SKINS] = { +const char *bot_skins[MAX_SKINS] = { "barney", "gina", "gman", "gordon", "helmet", "hgrunt", "recon", "robo", "scientist", "zombie"}; // store the player names for each of the models... -char *bot_names[MAX_SKINS] = { +const char *bot_names[MAX_SKINS] = { "Barney", "Gina", "G-Man", "Gordon", "Helmet", "H-Grunt", "Recon", "Robo", "Scientist", "Zombie"}; @@ -101,13 +101,13 @@ inline char *GET_INFOBUFFER( edict_t *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 )); } -inline void SET_CLIENT_KEY_VALUE( int clientIndex, char *infobuffer, - char *key, char *value ) +inline void SET_CLIENT_KEY_VALUE( int clientIndex, const char *infobuffer, + const char *key, const char *value ) { (*g_engfuncs.pfnSetClientKeyValue)( clientIndex, infobuffer, key, value ); } @@ -221,7 +221,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\n", err_msg ); UTIL_ClientPrintAll( HUD_PRINTNOTIFY, "use barney, gina, gman, gordon, helmet, hgrunt,\n"); diff --git a/dlls/bot/bot.h b/dlls/bot/bot.h index a459d97b..e1412db9 100644 --- a/dlls/bot/bot.h +++ b/dlls/bot/bot.h @@ -26,8 +26,8 @@ typedef struct // used in checking if bot can pick up ammo { - char *ammo_name; - char *weapon_name; + const char *ammo_name; + const char *weapon_name; int max_carry; } ammo_check_t; diff --git a/dlls/client.cpp b/dlls/client.cpp index 0a3e7e79..a4018609 100644 --- a/dlls/client.cpp +++ b/dlls/client.cpp @@ -1205,7 +1205,7 @@ void StartFrame( void ) if( IS_DEDICATED_SERVER() ) { sprintf( msg, "min_bots set to %d\n", min_bots ); - printf( msg ); + printf( "%s\n", msg ); } } else if( strcmp( cmd, "max_bots" ) == 0 ) @@ -1218,7 +1218,7 @@ void StartFrame( void ) if( IS_DEDICATED_SERVER() ) { sprintf( msg, "max_bots set to %d\n", max_bots ); - printf( msg ); + printf( "%s\n", msg ); } } else if( strcmp( cmd, "pause" ) == 0 ) @@ -1232,7 +1232,7 @@ void StartFrame( void ) ALERT( at_console, msg ); if( IS_DEDICATED_SERVER() ) - printf( msg ); + printf( "%s\n", msg ); SERVER_COMMAND( server_cmd ); } @@ -1250,7 +1250,7 @@ void StartFrame( void ) { check_server_cmd = gpGlobals->time + 1.0; - char *cvar_bot = (char *)CVAR_GET_STRING( "bot" ); + const char *cvar_bot = CVAR_GET_STRING( "bot" ); if( cvar_bot && cvar_bot[0] ) { diff --git a/engine/eiface.h b/engine/eiface.h index 6fa51c12..ddb06972 100644 --- a/engine/eiface.h +++ b/engine/eiface.h @@ -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 ); int (*pfnNumberOfEntities)( void ); char* (*pfnGetInfoKeyBuffer)( edict_t *e ); // passing in NULL gets the serverinfo - char* (*pfnInfoKeyValue)( char *infobuffer, const char *key ); - void (*pfnSetKeyValue)( char *infobuffer, const char *key, const char *value ); - void (*pfnSetClientKeyValue)( int clientIndex, char *infobuffer, const char *key, const char *value ); + char* (*pfnInfoKeyValue)( const char *infobuffer, const char *key ); + void (*pfnSetKeyValue)( const 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 ); void (*pfnStaticDecal)( const float *origin, int decalIndex, int entityIndex, int modelIndex ); int (*pfnPrecacheGeneric)( const char *s );