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

@ -2465,7 +2465,7 @@ void Net_DoCommand (int type, uint8_t **stream, int player)
case DEM_FOV:
{
float newfov = (float)ReadByte (stream);
float newfov = ReadFloat (stream);
if (newfov != players[consoleplayer].DesiredFOV)
{
@ -2485,7 +2485,7 @@ void Net_DoCommand (int type, uint8_t **stream, int player)
break;
case DEM_MYFOV:
players[player].DesiredFOV = (float)ReadByte (stream);
players[player].DesiredFOV = ReadFloat (stream);
break;
case DEM_RUNSCRIPT:
@ -2775,6 +2775,8 @@ void Net_SkipCommand (int type, uint8_t **stream)
break;
case DEM_INVUSE:
case DEM_FOV:
case DEM_MYFOV:
skip = 4;
break;
@ -2784,8 +2786,6 @@ void Net_SkipCommand (int type, uint8_t **stream)
case DEM_GENERICCHEAT:
case DEM_DROPPLAYER:
case DEM_FOV:
case DEM_MYFOV:
case DEM_ADDCONTROLLER:
case DEM_DELCONTROLLER:
skip = 1;