giga shizo spec synch "fix"
ok so, for whatever dumb reason, spectatormovement will desynch at random, even on localhost. with this we just literally fucking ignore almost every button input locally and just wont move our spectator player at all. but since we are indeed still runiing specatotr movement code, and this is localcmd shit, the server just thinks we dont want to move and thus is "synchsave". sadly this does not fix desynchs from vanilla players the only code we keep is for button inputs that do certain actions like "item" so we can still join from spec with it and other crap
This commit is contained in:
1 parent
3388d35fe0
commit
01b942e1fc
2 files changed
+41
-1
No files matched your search
@@ -905,6 +905,46 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
||||
break;
|
||||
}
|
||||
|
||||
if (player->spectator)
|
||||
{
|
||||
axis = JoyAxis(AXISMOVE, ssplayer);
|
||||
if (InputDown(gc_accelerate, ssplayer) || (usejoystick && axis > 0))
|
||||
cmd->buttons |= BT_ACCELERATE;
|
||||
axis = JoyAxis(AXISBRAKE, ssplayer);
|
||||
if (InputDown(gc_brake, ssplayer) || (usejoystick && axis > 0))
|
||||
cmd->buttons |= BT_BRAKE;
|
||||
axis = JoyAxis(AXISFIRE, ssplayer);
|
||||
if (InputDown(gc_fire, ssplayer) || (usejoystick && axis > 0))
|
||||
cmd->buttons |= BT_ATTACK;
|
||||
|
||||
// drift with any button/key
|
||||
axis = JoyAxis(AXISDRIFT, ssplayer);
|
||||
if (InputDown(gc_drift, ssplayer) || (usejoystick && axis > 0))
|
||||
cmd->buttons |= BT_DRIFT;
|
||||
|
||||
// Lua scriptable buttons
|
||||
axis = JoyAxis(AXISCUSTOM1, ssplayer);
|
||||
if (InputDown(gc_custom1, ssplayer) || (usejoystick && axis > 0))
|
||||
cmd->buttons |= BT_CUSTOM1;
|
||||
axis = JoyAxis(AXISCUSTOM2, ssplayer);
|
||||
if (InputDown(gc_custom2, ssplayer) || (usejoystick && axis > 0))
|
||||
cmd->buttons |= BT_CUSTOM2;
|
||||
axis = JoyAxis(AXISCUSTOM3, ssplayer);
|
||||
if (InputDown(gc_custom3, ssplayer) || (usejoystick && axis > 0))
|
||||
cmd->buttons |= BT_CUSTOM3;
|
||||
|
||||
// Reset camera
|
||||
if (InputDown(gc_camreset, ssplayer))
|
||||
{
|
||||
if (thiscam->chase && !rd)
|
||||
P_ResetCamera(player, thiscam);
|
||||
rd = true;
|
||||
}
|
||||
else
|
||||
rd = false;
|
||||
return;
|
||||
}
|
||||
|
||||
// why build a ticcmd if we're paused?
|
||||
// Or, for that matter, if we're being reborn.
|
||||
// Kart, don't build a ticcmd if someone is resynching or the server is stopped too so we don't fly off course in bad conditions
|
||||
|
||||
+1
-1
@@ -2109,7 +2109,7 @@ static void P_SpectatorMovement(player_t *player)
|
||||
{
|
||||
ticcmd_t *cmd = &player->cmd;
|
||||
|
||||
player->mo->angle = (cmd->angleturn<<16 /* not FRACBITS */);
|
||||
player->mo->angle = (angle_t)(cmd->angleturn<<16 /* not FRACBITS */);
|
||||
|
||||
ticruned++;
|
||||
if (!(cmd->angleturn & TICCMD_RECEIVED))
|
||||
|
||||
Reference in new issue
Block a user