Browse Source

Fix warnings.

dmc
Night Owl 7 years ago
parent
commit
b22ea2889f
  1. 2
      cl_dll/dmc/DMC_Teleporters.cpp
  2. 6
      cl_dll/ev_hldm.cpp
  3. 2
      cl_dll/quake/quake_weapons.cpp
  4. 1
      cl_dll/view.cpp
  5. 2
      dlls/aghl/agglobal.cpp
  6. 2
      dlls/aghl/agspectator.cpp
  7. 2
      dlls/cbase.h
  8. 4
      dlls/dmc/observer.cpp
  9. 7
      dlls/dmc/quake_weapons_all.cpp
  10. 2
      dlls/multiplay_gamerules.cpp
  11. 2
      dlls/player.cpp
  12. 2
      dlls/player.h

2
cl_dll/dmc/DMC_Teleporters.cpp

@ -463,7 +463,7 @@ void Dmc_TouchTeleporters ( struct local_state_s *player, dmc_tele_t *pTeles, i
//This comes via an event when the player connects. //This comes via an event when the player connects.
if ( !g_bLoadedTeles ) if ( !g_bLoadedTeles )
{ {
for ( int j = 0; j < 3; j++ ) for( j = 0; j < 3; j++ )
{ {
pTele->absmin[ j ] = g_vecTeleMins[ iTeleNum ][ j ] - 1.0; pTele->absmin[ j ] = g_vecTeleMins[ iTeleNum ][ j ] - 1.0;
pTele->absmax[ j ] = g_vecTeleMaxs[ iTeleNum ][ j ] + 1.0; pTele->absmax[ j ] = g_vecTeleMaxs[ iTeleNum ][ j ] + 1.0;

6
cl_dll/ev_hldm.cpp

@ -716,13 +716,11 @@ void EV_FireLightning( event_args_t *args )
int idx; int idx;
vec3_t origin, endorigin; vec3_t origin, endorigin;
vec3_t angles; vec3_t angles;
vec3_t vecEnd;
vec3_t up, right, forward; vec3_t up, right, forward;
int iShutDown; int iShutDown;
cl_entity_t *player; cl_entity_t *player;
pmtrace_t tr;
int modelIndex; int modelIndex;
bool bSound = false; bool bSound = false;
@ -750,7 +748,7 @@ void EV_FireLightning( event_args_t *args )
V_PunchAxis( 0, Q_SMALL_PUNCHANGLE_KICK ); V_PunchAxis( 0, Q_SMALL_PUNCHANGLE_KICK );
cl_entity_t *player = gEngfuncs.GetViewModel(); player = gEngfuncs.GetViewModel();
origin = player->attachment[0]; origin = player->attachment[0];
} }
else else
@ -767,7 +765,7 @@ void EV_FireLightning( event_args_t *args )
if ( iShutDown == 0 && EV_IsLocal( idx ) && pBeam == NULL ) if ( iShutDown == 0 && EV_IsLocal( idx ) && pBeam == NULL )
{ {
vec3_t vecSrc, vecEnd, origin, angles, forward, right, up; vec3_t vecSrc, vecEnd;
pmtrace_t tr; pmtrace_t tr;
cl_entity_t *pl = gEngfuncs.GetEntityByIndex( idx ); cl_entity_t *pl = gEngfuncs.GetEntityByIndex( idx );

2
cl_dll/quake/quake_weapons.cpp

@ -448,7 +448,7 @@ BOOL CQuakeGun::Deploy( )
return TRUE; return TRUE;
} }
int HUD_GetModelIndex( char *modelname ) int HUD_GetModelIndex( const char *modelname )
{ {
int retval = 0; int retval = 0;
gEngfuncs.CL_LoadModel( modelname, &retval ); gEngfuncs.CL_LoadModel( modelname, &retval );

1
cl_dll/view.cpp

@ -1373,7 +1373,6 @@ void V_CalcSpectatorRefdef( struct ref_params_s *pparams )
if( i < ORIGIN_MASK && ViewInterp.OriginTime[foundidx & ORIGIN_MASK] != 0.0 ) if( i < ORIGIN_MASK && ViewInterp.OriginTime[foundidx & ORIGIN_MASK] != 0.0 )
{ {
// Interpolate // Interpolate
vec3_t delta;
double frac; double frac;
double dt; double dt;
vec3_t neworg; vec3_t neworg;

2
dlls/aghl/agglobal.cpp

@ -103,7 +103,7 @@ CBasePlayer* AgPlayerByIndex(int iPlayerIndex )
CBaseEntity* pEnt = (CBaseEntity *)CBaseEntity::Instance( pPlayerEdict ); CBaseEntity* pEnt = (CBaseEntity *)CBaseEntity::Instance( pPlayerEdict );
if (pEnt && pEnt->pev && CLASS_PLAYER == pEnt->Classify()) if (pEnt && pEnt->pev && CLASS_PLAYER == pEnt->Classify())
{ {
if (pEnt->pev->netname && 0 != STRING(pEnt->pev->netname)[0]) if (pEnt->pev->netname && 0 != ( STRING( pEnt->pev->netname ) )[0])
{ {
pPlayer = (CBasePlayer*)pEnt; pPlayer = (CBasePlayer*)pEnt;
} }

2
dlls/aghl/agspectator.cpp

@ -94,7 +94,7 @@ void CBasePlayer::Spectate_Start()
EnableControl(TRUE); EnableControl(TRUE);
if ( m_pTank != NULL ) if ( m_pTank != 0 )
{ {
m_pTank->Use( this, this, USE_OFF, 0 ); m_pTank->Use( this, this, USE_OFF, 0 );
m_pTank = NULL; m_pTank = NULL;

2
dlls/cbase.h

@ -783,7 +783,7 @@ public:
}; };
// QUAKECLASSIC // QUAKECLASSIC
extern char *g_szDeathType; extern const char *g_szDeathType;
//++ BulliT //++ BulliT
#endif //_CBASE_H_ #endif //_CBASE_H_

4
dlls/dmc/observer.cpp

@ -113,12 +113,12 @@ void CBasePlayer::Observer_SetMode( int iMode )
iMode = OBS_IN_EYE; // now it is iMode = OBS_IN_EYE; // now it is
// if we are not roaming, we need a valid target to track // if we are not roaming, we need a valid target to track
if ( (iMode != OBS_ROAMING) && (m_hObserverTarget == NULL) ) if ( (iMode != OBS_ROAMING) && (m_hObserverTarget == 0) )
{ {
Observer_FindNextPlayer(); Observer_FindNextPlayer();
// if we didn't find a valid target switch to roaming // if we didn't find a valid target switch to roaming
if (m_hObserverTarget == NULL) if (m_hObserverTarget == 0)
{ {
ClientPrint( pev, HUD_PRINTCENTER, "#Spec_NoTarget" ); ClientPrint( pev, HUD_PRINTCENTER, "#Spec_NoTarget" );
iMode = OBS_ROAMING; iMode = OBS_ROAMING;

7
dlls/dmc/quake_weapons_all.cpp

@ -132,9 +132,9 @@ void CBasePlayer::W_SetCurrentAmmo( int sendanim /* = 1 */ )
{ {
m_iQuakeItems &= ~(IT_SHELLS | IT_NAILS | IT_ROCKETS | IT_CELLS); m_iQuakeItems &= ~(IT_SHELLS | IT_NAILS | IT_ROCKETS | IT_CELLS);
int iszViewModel = 0; int iszViewModel = 0;
char *viewmodel = ""; const char *viewmodel = "";
int iszWeaponModel = 0; int iszWeaponModel = 0;
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)
@ -223,7 +223,8 @@ void CBasePlayer::W_SetCurrentAmmo( int sendanim /* = 1 */ )
#else #else
{ {
int HUD_GetModelIndex( char *modelname ); extern int HUD_GetModelIndex( const char *modelname );
pev->viewmodel = HUD_GetModelIndex( viewmodel ); pev->viewmodel = HUD_GetModelIndex( viewmodel );
cl_entity_t *view; cl_entity_t *view;

2
dlls/multiplay_gamerules.cpp

@ -47,7 +47,7 @@ bool g_bHaveMOTD;
#define WEAPON_RESPAWN_TIME 20 #define WEAPON_RESPAWN_TIME 20
#define AMMO_RESPAWN_TIME 20 #define AMMO_RESPAWN_TIME 20
char *g_szDeathType; const char *g_szDeathType;
float g_flIntermissionStartTime = 0; float g_flIntermissionStartTime = 0;
#ifndef NO_VOICEGAMEMGR #ifndef NO_VOICEGAMEMGR

2
dlls/player.cpp

@ -4716,7 +4716,7 @@ bool CBasePlayer::RespawnMatch()
//Remove all weapons/items //Remove all weapons/items
RemoveAllItemsNoClientMessage(); RemoveAllItemsNoClientMessage();
if( m_pTank != NULL ) if( m_pTank != 0 )
{ {
m_pTank->Use( this, this, USE_OFF, 0 ); m_pTank->Use( this, this, USE_OFF, 0 );
m_pTank = NULL; m_pTank = NULL;

2
dlls/player.h

@ -446,7 +446,7 @@ public:
//++ BulliT //++ BulliT
inline const char *CBasePlayer::GetName() inline const char *CBasePlayer::GetName()
{ {
return pev->netname ? STRING( pev->netname )[0] ? STRING( pev->netname ) : "" : ""; return pev->netname ? ( ( STRING( pev->netname ) )[0] ? STRING( pev->netname ) : "" ) : "";
}; };
inline bool CBasePlayer::IsIngame() inline bool CBasePlayer::IsIngame()

Loading…
Cancel
Save