make this "work"
This commit is contained in:
1 parent
a18662ebce
commit
b30ff1db0e
2 files changed
+13
-12
No files matched your search
+8
-8
@@ -206,7 +206,7 @@ tic_t DecodeTiccmdTime(const ticcmd_t *ticcmd);
|
||||
static boolean CompareTiccmd(const ticcmd_t *a, const ticcmd_t *b);
|
||||
static void AdjustSimulatedTiccmdInputs(ticcmd_t *cmds);
|
||||
|
||||
static void RunSimulations();
|
||||
static void RunSimulations(void);
|
||||
// Net simulation stuff END
|
||||
|
||||
// engine
|
||||
@@ -6164,10 +6164,10 @@ static void CL_SendClientCmd(void)
|
||||
}
|
||||
|
||||
packetsize = sizeof (clientcmd_pak);
|
||||
ticcmd_t adjustedCmd = localcmds[0][lagDelay];
|
||||
AdjustSimulatedTiccmdInputs(&adjustedCmd);
|
||||
//ticcmd_t adjustedCmd = localcmds[0][lagDelay];
|
||||
//AdjustSimulatedTiccmdInputs(&adjustedCmd);
|
||||
|
||||
G_MoveTiccmd(&netbuffer->u.clientpak.cmd, &adjustedCmd, 1);
|
||||
G_MoveTiccmd(&netbuffer->u.clientpak.cmd, &localcmds[0][lagDelay], 1);
|
||||
netbuffer->u.clientpak.consistancy = SHORT(consistancy[gametic % BACKUPTICS]);
|
||||
|
||||
if (splitscreen || botingame) // Send a special packet with 2 cmd for splitscreen
|
||||
@@ -6606,7 +6606,7 @@ boolean TryRunTics(tic_t realtics, tic_t entertic)
|
||||
for (tic_t i = 0; i < realtics; i++)
|
||||
{
|
||||
//localcmds are being calculated in NetUpdate()->Local_Maketic() function
|
||||
localTicBuffer[(liveTic - i) % MAXSIMULATIONS] = localcmds[0][min(i, MAXGENTLEMENDELAY-1)];
|
||||
localTicBuffer[(liveTic - i) % MAXSIMULATIONS] = localcmds[0][0];
|
||||
}
|
||||
|
||||
ticking = (neededtic > gametic);
|
||||
@@ -6705,7 +6705,7 @@ boolean TryRunTics(tic_t realtics, tic_t entertic)
|
||||
}
|
||||
DEBFILE(va("============ Running SIMMISS tic %d (local %d)\n", gametic, localgametic));
|
||||
issimulation = true;
|
||||
G_Ticker(true); //tic one tic further as usual
|
||||
//G_Ticker(true); //tic one tic further as usual
|
||||
netcmds[gametic % BACKUPTICS][consoleplayer] = temp;
|
||||
issimulation = false;
|
||||
}
|
||||
@@ -6931,10 +6931,10 @@ static void RunSimulations(void)
|
||||
netcmds[gametic % BACKUPTICS][consoleplayer] = localTicBuffer[(liveTic - estimatedRTT + i + 1 + MAXSIMULATIONS) % MAXSIMULATIONS];
|
||||
}
|
||||
else
|
||||
netcmds[gametic % BACKUPTICS][consoleplayer] = localcmds[0][min(i, MAXGENTLEMENDELAY-1)]; //NO
|
||||
netcmds[gametic % BACKUPTICS][consoleplayer] = localcmds[0][0]; //NO
|
||||
|
||||
DEBFILE(va("============ Running SIM tic %d (local %d) (sim %d)\n", gametic, localgametic, simtic));
|
||||
G_Ticker(true); // tic a bunch of times lol see what happens lolol
|
||||
//G_Ticker(true); // tic a bunch of times lol see what happens lolol
|
||||
simtic++;
|
||||
|
||||
// record simulated players' positions
|
||||
|
||||
+5
-4
@@ -4277,7 +4277,7 @@ void P_SaveGameState(savestate_t* savestate, savebuffer_t *save)
|
||||
WRITEUINT32(save->p, globalmobjnum);
|
||||
|
||||
CV_SaveNetVars(&save->p, false);
|
||||
P_NetArchiveMisc(save, false);
|
||||
P_NetArchiveMisc(save, true);
|
||||
|
||||
// assign mobj nums for pointer relinking
|
||||
for (th = thinkercap.next; th != &thinkercap; th = th->next)
|
||||
@@ -4294,7 +4294,7 @@ void P_SaveGameState(savestate_t* savestate, savebuffer_t *save)
|
||||
}
|
||||
|
||||
|
||||
P_NetArchivePlayers(save, false);
|
||||
P_NetArchivePlayers(save, true);
|
||||
|
||||
if (gamestate == GS_LEVEL)
|
||||
{
|
||||
@@ -4333,14 +4333,15 @@ boolean P_LoadGameState(const savestate_t* savestate, savebuffer_t *save)
|
||||
|
||||
CV_LoadNetVars(&save->p);
|
||||
|
||||
if (P_NetUnArchiveMisc(save, false, true))
|
||||
if (P_NetUnArchiveMisc(save, true, true))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
P_NetUnArchivePlayers(save, true);
|
||||
|
||||
if (gamestate == GS_LEVEL)
|
||||
{
|
||||
P_NetUnArchivePlayers(save, false);
|
||||
P_LocalUnArchiveWorld(save);
|
||||
P_UnArchivePolyObjects(save);
|
||||
P_NetUnArchiveThinkers(save, false);
|
||||
|
||||
Reference in new issue
Block a user