Merge pull request #54 from FreeSlave/fix_zoom_crosshair

Always update gHUD.m_iFOV on SetFOV message. Fix #53
This commit is contained in:
Alibek Omarov 2018-04-01 22:09:40 +03:00 committed by GitHub
commit 632b324187
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 9 deletions

View File

@ -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;

View File

@ -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 )

View File

@ -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;
}