diff --git a/cl_dll/3wave/CTF_HudMessage.cpp b/cl_dll/3wave/CTF_HudMessage.cpp index 0ce94c91..e00c223b 100644 --- a/cl_dll/3wave/CTF_HudMessage.cpp +++ b/cl_dll/3wave/CTF_HudMessage.cpp @@ -12,7 +12,6 @@ * without written permission from Valve LLC. * ****/ - #include "hud.h" #include "cl_util.h" #include "parsemsg.h" @@ -27,7 +26,6 @@ #include "ref_params.h" #include - #define MAX_BONUS 10 #define RED_FLAG_STOLEN 1 @@ -41,9 +39,7 @@ #define RED_FLAG_LOST_HUD 9 #define BLUE_FLAG_LOST_HUD 10 - - -char *sBonusStrings[] = +const char *sBonusStrings[] = { "", "\\w stole the \\rRED\\w Flag!", diff --git a/cl_dll/scoreboard.cpp b/cl_dll/scoreboard.cpp index 188dface..ba362523 100644 --- a/cl_dll/scoreboard.cpp +++ b/cl_dll/scoreboard.cpp @@ -429,7 +429,7 @@ int CHudScoreboard::DrawPlayers( int xpos_rel, float list_slot, int nameoffset, if( g_PlayerExtraInfo[best_player].iHasFlag ) { - HSPRITE hFlag; + HSPRITE hFlag = 0; if( g_PlayerExtraInfo[best_player].teamnumber == 1 ) { diff --git a/dlls/3wave/threewave_gamerules.cpp b/dlls/3wave/threewave_gamerules.cpp index a660e984..a9c3362a 100644 --- a/dlls/3wave/threewave_gamerules.cpp +++ b/dlls/3wave/threewave_gamerules.cpp @@ -23,7 +23,7 @@ #define NUM_TEAMS 2 -char *sTeamNames[] = +const char *sTeamNames[] = { "SPECTATOR", "RED", @@ -277,7 +277,7 @@ int CThreeWave::TeamWithFewestPlayers( void ) int iNumRed, iNumBlue; - int iTeam; + int iTeam = 0; // Initialize the player counts.. iNumRed = iNumBlue = 0; @@ -488,7 +488,7 @@ void CThreeWave :: PlayerSpawn( CBasePlayer *pPlayer ) addDefault = TRUE; - while ( pWeaponEntity = UTIL_FindEntityByClassname( pWeaponEntity, "game_player_equip" )) + while( ( pWeaponEntity = UTIL_FindEntityByClassname( pWeaponEntity, "game_player_equip" ) ) ) { pWeaponEntity->Touch( pPlayer ); addDefault = FALSE; @@ -521,7 +521,7 @@ void CThreeWave :: PlayerSpawn( CBasePlayer *pPlayer ) MESSAGE_END();*/ } -void CBasePlayer::ShowMenu ( int bitsValidSlots, int nDisplayTime, BOOL fNeedMore, char *pszText ) +void CBasePlayer::ShowMenu ( int bitsValidSlots, int nDisplayTime, BOOL fNeedMore, const char *pszText ) { MESSAGE_BEGIN( MSG_ONE, gmsgShowMenu, NULL, pev); WRITE_SHORT( bitsValidSlots); @@ -698,7 +698,7 @@ void CThreeWave :: ClientDisconnected( edict_t *pClient ) //We have the flag, spawn it if ( pPlayer->m_bHasFlag ) { - CBaseEntity *pEnt; + CBaseEntity *pEnt = NULL; //We have the BLUE flag, Spawn it if ( pPlayer->pev->team == RED ) @@ -750,7 +750,7 @@ void CThreeWave :: ClientDisconnected( edict_t *pClient ) // drop any runes the player has CBaseEntity *pRune; - char * runeName; + const char *runeName; switch ( pPlayer->m_iRuneStatus ) { @@ -995,7 +995,7 @@ void CThreeWave :: PlayerKilled( CBasePlayer *pVictim, entvars_t *pKiller, entva } - CBaseEntity *pEnt; + CBaseEntity *pEnt = NULL; //We have the BLUE flag, Spawn it if ( pVictim->pev->team == RED ) @@ -1236,7 +1236,7 @@ void CThreeWave :: PlayerKilled( CBasePlayer *pVictim, entvars_t *pKiller, entva } CBaseEntity *pRune; - char * runeName; + const char * runeName; switch ( pVictim->m_iRuneStatus ) { @@ -2345,7 +2345,7 @@ void DropRune ( CBasePlayer *pPlayer ) } CBaseEntity *pRune = NULL; - char * runeName; + const char * runeName; if ( pPlayer->m_iRuneStatus == ITEM_RUNE1_FLAG ) { diff --git a/dlls/dmc/quake_weapons_all.cpp b/dlls/dmc/quake_weapons_all.cpp index 9c43e35a..8020cb4d 100644 --- a/dlls/dmc/quake_weapons_all.cpp +++ b/dlls/dmc/quake_weapons_all.cpp @@ -140,7 +140,7 @@ void CBasePlayer::W_SetCurrentAmmo( int sendanim /* = 1 */ ) int iszViewModel = 0; const char *viewmodel = ""; int iszWeaponModel = 0; - const char *szAnimExt; + const char *szAnimExt = ""; // Find out what weapon the player's using if (m_iQuakeWeapon == IT_AXE) diff --git a/dlls/player.h b/dlls/player.h index 9854beb2..2a05d536 100644 --- a/dlls/player.h +++ b/dlls/player.h @@ -448,7 +448,7 @@ public: //-- Martin Webrant int m_bHasFlag; - void ShowMenu( int bitsValidSlots, int nDisplayTime, BOOL fNeedMore, char *pszText ); + void ShowMenu( int bitsValidSlots, int nDisplayTime, BOOL fNeedMore, const char *pszText ); int m_iMenu; float m_flNextTeamChange;