mirror of
https://github.com/FWGS/hlsdk-xash3d
synced 2024-11-22 09:57:21 +01:00
Merge pull request #54 from FreeSlave/fix_zoom_crosshair
Always update gHUD.m_iFOV on SetFOV message. Fix #53
This commit is contained in:
commit
632b324187
@ -34,7 +34,6 @@
|
||||
|
||||
extern globalvars_t *gpGlobals;
|
||||
extern int g_iUser1;
|
||||
extern bool g_hasPredictedFOV; // Vit_amiN: from HUD
|
||||
|
||||
// Pool of client side entities/entvars_t
|
||||
static entvars_t ev[32];
|
||||
@ -882,7 +881,6 @@ void HUD_WeaponsPostThink( local_state_s *from, local_state_s *to, usercmd_t *cm
|
||||
to->client.fuser2 = player.m_flNextAmmoBurn;
|
||||
to->client.fuser3 = player.m_flAmmoStartCharge;
|
||||
to->client.maxspeed = player.pev->maxspeed;
|
||||
g_hasPredictedFOV = true; // Vit_amiN: ready
|
||||
|
||||
//HL Weapons
|
||||
to->client.vuser1[0] = player.ammo_9mm;
|
||||
|
@ -413,7 +413,6 @@ int CHud::MsgFunc_Logo( const char *pszName, int iSize, void *pbuf )
|
||||
}
|
||||
|
||||
float g_lastFOV = 0.0;
|
||||
bool g_hasPredictedFOV = false; // Vit_amiN: it'll became true after the first prediction
|
||||
|
||||
/*
|
||||
============
|
||||
@ -514,10 +513,6 @@ int CHud::MsgFunc_SetFOV( const char *pszName, int iSize, void *pbuf )
|
||||
int newfov = READ_BYTE();
|
||||
int def_fov = CVAR_GET_FLOAT( "default_fov" );
|
||||
|
||||
//Weapon prediction already takes care of changing the fog. ( g_lastFOV ).
|
||||
if( g_hasPredictedFOV )
|
||||
return 1;
|
||||
|
||||
g_lastFOV = newfov;
|
||||
|
||||
if( newfov == 0 )
|
||||
|
@ -28,7 +28,6 @@ extern BEAM *pBeam2;
|
||||
extern TEMPENTITY *pFlare; // Vit_amiN
|
||||
|
||||
extern float g_lastFOV; // Vit_amiN
|
||||
extern bool g_hasPredictedFOV; // Vit_amiN
|
||||
|
||||
/// USER-DEFINED SERVER MESSAGE HANDLERS
|
||||
|
||||
@ -55,7 +54,6 @@ int CHud::MsgFunc_ResetHUD( const char *pszName, int iSize, void *pbuf )
|
||||
// Vit_amiN: reset the FOV
|
||||
m_iFOV = 0; // default_fov
|
||||
g_lastFOV = 0.0f;
|
||||
g_hasPredictedFOV = false;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user