Blood: input code improvements

Repairs interpolation issues introduced in 96c9ca657e as reported in https://forum.zdoom.org/viewtopic.php?f=340&t=69009
This commit is contained in:
nukeykt 2020-05-28 00:22:58 +09:00 committed by Christoph Oelckers
parent 6fdc11d608
commit b907791558
4 changed files with 5 additions and 5 deletions

View File

@ -1224,6 +1224,8 @@ RESTART:
gBufferJitter = 0;
while (totalclock >= gNetFifoClock && ready2send)
{
gNetInput = gInput;
gInput = {};
netGetInput();
gNetFifoClock += 4;
while (gNetFifoHead[myconnectindex]-gNetFifoTail > gBufferJitter && !gStartNewGame && !gQuitGame)

View File

@ -39,7 +39,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
BEGIN_BLD_NS
GINPUT gInput;
GINPUT gInput, gNetInput;
bool bSilentAim = false;
int iTurnCount = 0;

View File

@ -103,7 +103,7 @@ struct GINPUT
#pragma pack(pop)
extern GINPUT gInput;
extern GINPUT gInput, gNetInput;
extern bool bSilentAim;
extern fix16_t gViewLook, gViewAngle;

View File

@ -734,10 +734,8 @@ void netGetInput(void)
for (int p = connecthead; p >= 0; p = connectpoint2[p])
if (gNetFifoHead[myconnectindex]-200 > gNetFifoHead[p])
return;
ctrlGetInput();
GINPUT &input = gFifoInput[gNetFifoHead[myconnectindex]&255][myconnectindex];
input = gInput;
gInput = {};
input = gNetInput;
gNetFifoHead[myconnectindex]++;
if (gGameOptions.nGameType == 0 || numplayers == 1)
{