From 7eeccf6ecf642c76ab2668526ebbea4b9b2421e4 Mon Sep 17 00:00:00 2001 From: Night Owl Date: Mon, 25 Dec 2017 01:25:40 +0500 Subject: [PATCH] Fix build. --- cl_dll/ev_hldm.cpp | 4 ++-- dlls/player.cpp | 6 +++--- dlls/poke646/firetrail.cpp | 4 ++-- dlls/poke646/robocop.cpp | 2 +- dlls/poke646/xenspit.cpp | 4 ++-- dlls/poke646/xensquasher.cpp | 2 +- dlls/weapons.cpp | 7 ------- dlls/weapons.h | 39 ------------------------------------ 8 files changed, 11 insertions(+), 57 deletions(-) diff --git a/cl_dll/ev_hldm.cpp b/cl_dll/ev_hldm.cpp index d6b92974..862c7f87 100644 --- a/cl_dll/ev_hldm.cpp +++ b/cl_dll/ev_hldm.cpp @@ -1879,7 +1879,7 @@ void EV_FireBradnailer( event_args_t *args ) VectorCopy( forward, vecAiming ); - EV_HLDM_FireBullets( idx, forward, right, up, 1, vecSrc, vecAiming, 8192, BULLET_PLAYER_NAIL, 2, &tracerCount[idx - 1], args->fparam1, args->fparam2 ); + EV_HLDM_FireBullets( idx, forward, right, up, 1, vecSrc, vecAiming, 8192, BULLET_PLAYER_NAIL, 2, &g_tracerCount[idx - 1], args->fparam1, args->fparam2 ); } //====================== @@ -1937,7 +1937,7 @@ void EV_FireNailgun( event_args_t *args ) VectorCopy( forward, vecAiming ); - EV_HLDM_FireBullets( idx, forward, right, up, 1, vecSrc, vecAiming, 8192, BULLET_PLAYER_NAIL, 1, &tracerCount[idx - 1], args->fparam1, args->fparam2 ); + EV_HLDM_FireBullets( idx, forward, right, up, 1, vecSrc, vecAiming, 8192, BULLET_PLAYER_NAIL, 1, &g_tracerCount[idx - 1], args->fparam1, args->fparam2 ); } //====================== diff --git a/dlls/player.cpp b/dlls/player.cpp index 572f65db..8034a887 100644 --- a/dlls/player.cpp +++ b/dlls/player.cpp @@ -4637,12 +4637,12 @@ BOOL CBasePlayer::SwitchWeapon( CBasePlayerItem *pWeapon ) void CBasePlayer::IncrementExertLevel( int amount ) { - m_iExertLevel += min( amount, PLAYER_EXERT_LEVEL_MAX - m_iExertLevel ); + m_iExertLevel += Q_min( amount, PLAYER_EXERT_LEVEL_MAX - m_iExertLevel ); } void CBasePlayer::DecrementExertLevel( int amount ) { - m_iExertLevel -= min( amount, m_iExertLevel ); + m_iExertLevel -= Q_min( amount, m_iExertLevel ); } void CBasePlayer::SetExertLevel( int level ) @@ -4667,7 +4667,7 @@ void CBasePlayer::UpdateExertLevel( void ) if( temp < 1 ) temp = 1; - m_iExertLevel -= min( m_iExertLevel, temp ); + m_iExertLevel -= Q_min( m_iExertLevel, temp ); m_flExertRate = PLAYER_EXERT_RATE; m_flExertUpdateStart = gpGlobals->time; diff --git a/dlls/poke646/firetrail.cpp b/dlls/poke646/firetrail.cpp index e274df11..587f7bcc 100644 --- a/dlls/poke646/firetrail.cpp +++ b/dlls/poke646/firetrail.cpp @@ -60,7 +60,7 @@ void CFireTrail::Think(void) pSprite->AnimateAndDie(RANDOM_FLOAT(15.0f, 20.0f)); pSprite->SetTransparency( kRenderTransAdd, 255, 255, 255, 192, kRenderFxNoDissipation ); pSprite->SetScale(pev->speed); - pSprite->pev->frame = pSprite->Frames() - ((max(0, pev->speed - (0.1 * pSprite->pev->framerate)) * pSprite->Frames()) / pev->maxspeed); + pSprite->pev->frame = pSprite->Frames() - ((Q_max(0, pev->speed - (0.1 * pSprite->pev->framerate)) * pSprite->Frames()) / pev->maxspeed); pev->speed -= 0.1; if (pev->speed > 0) @@ -80,4 +80,4 @@ void CFireTrail::Touch(CBaseEntity *pOther) if ((pev->velocity.x*pev->velocity.x + pev->velocity.y*pev->velocity.y) < 10.0) pev->speed = 0; -} \ No newline at end of file +} diff --git a/dlls/poke646/robocop.cpp b/dlls/poke646/robocop.cpp index d73528a4..6d78933c 100644 --- a/dlls/poke646/robocop.cpp +++ b/dlls/poke646/robocop.cpp @@ -1366,7 +1366,7 @@ void CRoboCop::BeamUpdate(void) if (m_pBeamSpot) { - m_pBeamSpot->pev->renderamt = UTIL_Approach(min(m_beamBrightness + 25, 255), m_pBeamSpot->pev->renderamt, 60); + m_pBeamSpot->pev->renderamt = UTIL_Approach(Q_min(m_beamBrightness + 25, 255), m_pBeamSpot->pev->renderamt, 60); if (m_pBeamSpot->pev->renderamt == 0) m_pBeamSpot->pev->effects |= EF_NODRAW; else diff --git a/dlls/poke646/xenspit.cpp b/dlls/poke646/xenspit.cpp index b38d433d..160796e4 100644 --- a/dlls/poke646/xenspit.cpp +++ b/dlls/poke646/xenspit.cpp @@ -262,7 +262,7 @@ void CXenLargeSpit::Touch(CBaseEntity *pOther) { // ALERT(at_console, " CXenLargeSpit::Touch START\n"); - float damage = max(pev->dmg, pev->dmg * m_iChildCount); + float damage = Q_max(pev->dmg, pev->dmg * m_iChildCount); RadiusDamage(pev->origin, pev, pev, damage, 110, CLASS_NONE, DMG_POISON | DMG_ALWAYSGIB); @@ -335,7 +335,7 @@ void CXenLargeSpit::CycleThink(void) float cs, sn, dist; cs = cos(pSpit->m_flCycle * 2 * M_PI); sn = sin(pSpit->m_flCycle * 2 * M_PI); - dist = max(2, 2 * m_iChildCount); + dist = Q_max(2, 2 * m_iChildCount); // ALERT(at_console, "cs: %.2f. sn: %.2f\n", cs, sn); diff --git a/dlls/poke646/xensquasher.cpp b/dlls/poke646/xensquasher.cpp index 0654a704..3d87a37c 100644 --- a/dlls/poke646/xensquasher.cpp +++ b/dlls/poke646/xensquasher.cpp @@ -406,7 +406,7 @@ void CXenSquasher::Fire(Vector vecOrigSrc, Vector vecDir, float flDamage) pLargeSpit->pev->velocity = gpGlobals->v_forward * 800; pLargeSpit->pev->scale = 0.2f; - int iNumProjectiles = max(1, flDamage * XENSPIT_MAX_PROJECTILES / 200); + int iNumProjectiles = Q_max(1, flDamage * XENSPIT_MAX_PROJECTILES / 200); float cycle = 0; float cycleGap = 1.0f / (float)iNumProjectiles; diff --git a/dlls/weapons.cpp b/dlls/weapons.cpp index d7b32446..68d9aaf3 100644 --- a/dlls/weapons.cpp +++ b/dlls/weapons.cpp @@ -1604,13 +1604,6 @@ TYPEDESCRIPTION CEgon::m_SaveData[] = IMPLEMENT_SAVERESTORE( CEgon, CBasePlayerWeapon ) -TYPEDESCRIPTION CHgun::m_SaveData[] = -{ - DEFINE_FIELD( CHgun, m_flRechargeTime, FIELD_FLOAT ), -}; - -IMPLEMENT_SAVERESTORE( CHgun, CBasePlayerWeapon ) - TYPEDESCRIPTION CSatchel::m_SaveData[] = { DEFINE_FIELD( CSatchel, m_chargeReady, FIELD_INTEGER ), diff --git a/dlls/weapons.h b/dlls/weapons.h index 97a36e53..93c1ac25 100644 --- a/dlls/weapons.h +++ b/dlls/weapons.h @@ -821,45 +821,6 @@ private: unsigned short m_usEgonFire; }; -class CHgun : public CBasePlayerWeapon -{ -public: -#ifndef CLIENT_DLL - int Save( CSave &save ); - int Restore( CRestore &restore ); - static TYPEDESCRIPTION m_SaveData[]; -#endif - void Spawn( void ); - void Precache( void ); - int iItemSlot( void ) { return 4; } - int GetItemInfo(ItemInfo *p); - int AddToPlayer( CBasePlayer *pPlayer ); - - void PrimaryAttack( void ); - void SecondaryAttack( void ); - BOOL Deploy( void ); - BOOL IsUseable( void ); - void Holster( int skiplocal = 0 ); - void Reload( void ); - void WeaponIdle( void ); - float m_flNextAnimTime; - - float m_flRechargeTime; - - int m_iFirePhase;// don't save me. - - virtual BOOL UseDecrement( void ) - { -#if defined( CLIENT_WEAPONS ) - return TRUE; -#else - return FALSE; -#endif - } -private: - unsigned short m_usHornetFire; -}; - class CHandGrenade : public CBasePlayerWeapon { public: