Send player FOV across the network as floatig point.

This commit is contained in:
nashmuhandes 2017-08-31 08:20:25 +08:00 committed by Christoph Oelckers
commit c885b6aa35
4 changed files with 10 additions and 10 deletions

View file

@ -399,19 +399,19 @@ CUSTOM_CVAR (Int, dmflags, 0, CVAR_SERVERINFO)
// If nofov is set, force everybody to the arbitrator's FOV.
if ((self & DF_NO_FOV) && consoleplayer == Net_Arbitrator)
{
uint8_t fov;
double fov;
Net_WriteByte (DEM_FOV);
// If the game is started with DF_NO_FOV set, the arbitrator's
// DesiredFOV will not be set when this callback is run, so
// be sure not to transmit a 0 FOV.
fov = (uint8_t)players[consoleplayer].DesiredFOV;
fov = players[consoleplayer].DesiredFOV;
if (fov == 0)
{
fov = 90;
}
Net_WriteByte (fov);
Net_WriteFloat (fov);
}
}