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:
parent
4a87a598fb
commit
bb1709228c
5 changed files with 47 additions and 29 deletions
|
|
@ -732,34 +732,6 @@ CCMD (dir)
|
|||
chdir (curdir);
|
||||
}
|
||||
|
||||
CCMD (fov)
|
||||
{
|
||||
player_t *player = who ? who->player : &players[consoleplayer];
|
||||
|
||||
if (argv.argc() != 2)
|
||||
{
|
||||
Printf ("fov is %g\n", player->DesiredFOV);
|
||||
return;
|
||||
}
|
||||
else if (dmflags & DF_NO_FOV)
|
||||
{
|
||||
if (consoleplayer == Net_Arbitrator)
|
||||
{
|
||||
Net_WriteByte (DEM_FOV);
|
||||
}
|
||||
else
|
||||
{
|
||||
Printf ("A setting controller has disabled FOV changes.\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Net_WriteByte (DEM_MYFOV);
|
||||
}
|
||||
Net_WriteByte (clamp (atoi (argv[1]), 5, 179));
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// CCMD warp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue