Changed FOV from a CCMD to a CVar, allowing players' FOV settings to persist. Also exported SetFOV to PlayerInfo for ZScript.

This commit is contained in:
nashmuhandes 2017-02-28 18:23:40 +08:00 committed by Christoph Oelckers
commit bb1709228c
5 changed files with 47 additions and 29 deletions

View file

@ -5305,6 +5305,7 @@ DEFINE_ACTION_FUNCTION(AActor, AdjustFloorClip)
//
EXTERN_CVAR (Bool, chasedemo)
EXTERN_CVAR(Bool, sv_singleplayerrespawn)
EXTERN_CVAR(Float, fov)
extern bool demonew;
@ -5442,7 +5443,7 @@ APlayerPawn *P_SpawnPlayer (FPlayerStart *mthing, int playernum, int flags)
mobj->sprite = Skins[p->userinfo.GetSkin()].sprite;
}
p->DesiredFOV = p->FOV = 90.f;
p->DesiredFOV = p->FOV = fov;
p->camera = p->mo;
p->playerstate = PST_LIVE;
p->refire = 0;