Browse Source

Fix warnings.

dmc
Night Owl 7 years ago
parent
commit
193f999cf4
  1. 6
      cl_dll/3wave/CTF_HudMessage.cpp
  2. 2
      cl_dll/scoreboard.cpp
  3. 18
      dlls/3wave/threewave_gamerules.cpp
  4. 2
      dlls/dmc/quake_weapons_all.cpp
  5. 2
      dlls/player.h

6
cl_dll/3wave/CTF_HudMessage.cpp

@ -12,7 +12,6 @@
* without written permission from Valve LLC. * without written permission from Valve LLC.
* *
****/ ****/
#include "hud.h" #include "hud.h"
#include "cl_util.h" #include "cl_util.h"
#include "parsemsg.h" #include "parsemsg.h"
@ -27,7 +26,6 @@
#include "ref_params.h" #include "ref_params.h"
#include <string.h> #include <string.h>
#define MAX_BONUS 10 #define MAX_BONUS 10
#define RED_FLAG_STOLEN 1 #define RED_FLAG_STOLEN 1
@ -41,9 +39,7 @@
#define RED_FLAG_LOST_HUD 9 #define RED_FLAG_LOST_HUD 9
#define BLUE_FLAG_LOST_HUD 10 #define BLUE_FLAG_LOST_HUD 10
const char *sBonusStrings[] =
char *sBonusStrings[] =
{ {
"", "",
"\\w stole the \\rRED\\w Flag!", "\\w stole the \\rRED\\w Flag!",

2
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 ) if( g_PlayerExtraInfo[best_player].iHasFlag )
{ {
HSPRITE hFlag; HSPRITE hFlag = 0;
if( g_PlayerExtraInfo[best_player].teamnumber == 1 ) if( g_PlayerExtraInfo[best_player].teamnumber == 1 )
{ {

18
dlls/3wave/threewave_gamerules.cpp

@ -23,7 +23,7 @@
#define NUM_TEAMS 2 #define NUM_TEAMS 2
char *sTeamNames[] = const char *sTeamNames[] =
{ {
"SPECTATOR", "SPECTATOR",
"RED", "RED",
@ -277,7 +277,7 @@ int CThreeWave::TeamWithFewestPlayers( void )
int iNumRed, iNumBlue; int iNumRed, iNumBlue;
int iTeam; int iTeam = 0;
// Initialize the player counts.. // Initialize the player counts..
iNumRed = iNumBlue = 0; iNumRed = iNumBlue = 0;
@ -488,7 +488,7 @@ void CThreeWave :: PlayerSpawn( CBasePlayer *pPlayer )
addDefault = TRUE; addDefault = TRUE;
while ( pWeaponEntity = UTIL_FindEntityByClassname( pWeaponEntity, "game_player_equip" )) while( ( pWeaponEntity = UTIL_FindEntityByClassname( pWeaponEntity, "game_player_equip" ) ) )
{ {
pWeaponEntity->Touch( pPlayer ); pWeaponEntity->Touch( pPlayer );
addDefault = FALSE; addDefault = FALSE;
@ -521,7 +521,7 @@ void CThreeWave :: PlayerSpawn( CBasePlayer *pPlayer )
MESSAGE_END();*/ 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); MESSAGE_BEGIN( MSG_ONE, gmsgShowMenu, NULL, pev);
WRITE_SHORT( bitsValidSlots); WRITE_SHORT( bitsValidSlots);
@ -698,7 +698,7 @@ void CThreeWave :: ClientDisconnected( edict_t *pClient )
//We have the flag, spawn it //We have the flag, spawn it
if ( pPlayer->m_bHasFlag ) if ( pPlayer->m_bHasFlag )
{ {
CBaseEntity *pEnt; CBaseEntity *pEnt = NULL;
//We have the BLUE flag, Spawn it //We have the BLUE flag, Spawn it
if ( pPlayer->pev->team == RED ) if ( pPlayer->pev->team == RED )
@ -750,7 +750,7 @@ void CThreeWave :: ClientDisconnected( edict_t *pClient )
// drop any runes the player has // drop any runes the player has
CBaseEntity *pRune; CBaseEntity *pRune;
char * runeName; const char *runeName;
switch ( pPlayer->m_iRuneStatus ) 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 //We have the BLUE flag, Spawn it
if ( pVictim->pev->team == RED ) if ( pVictim->pev->team == RED )
@ -1236,7 +1236,7 @@ void CThreeWave :: PlayerKilled( CBasePlayer *pVictim, entvars_t *pKiller, entva
} }
CBaseEntity *pRune; CBaseEntity *pRune;
char * runeName; const char * runeName;
switch ( pVictim->m_iRuneStatus ) switch ( pVictim->m_iRuneStatus )
{ {
@ -2345,7 +2345,7 @@ void DropRune ( CBasePlayer *pPlayer )
} }
CBaseEntity *pRune = NULL; CBaseEntity *pRune = NULL;
char * runeName; const char * runeName;
if ( pPlayer->m_iRuneStatus == ITEM_RUNE1_FLAG ) if ( pPlayer->m_iRuneStatus == ITEM_RUNE1_FLAG )
{ {

2
dlls/dmc/quake_weapons_all.cpp

@ -140,7 +140,7 @@ void CBasePlayer::W_SetCurrentAmmo( int sendanim /* = 1 */ )
int iszViewModel = 0; int iszViewModel = 0;
const char *viewmodel = ""; const char *viewmodel = "";
int iszWeaponModel = 0; int iszWeaponModel = 0;
const char *szAnimExt; const char *szAnimExt = "";
// Find out what weapon the player's using // Find out what weapon the player's using
if (m_iQuakeWeapon == IT_AXE) if (m_iQuakeWeapon == IT_AXE)

2
dlls/player.h

@ -448,7 +448,7 @@ public:
//-- Martin Webrant //-- Martin Webrant
int m_bHasFlag; 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; int m_iMenu;
float m_flNextTeamChange; float m_flNextTeamChange;

Loading…
Cancel
Save