Merge branch 'allowdesync' into 'next'

Add a console variable that will allow individual demos to desync....

See merge request STJr/SRB2!2361
This commit is contained in:
sphere authored and Alug committed 2025-07-01 19:05:35 +02:00
1 parent dd57ae3c3c
commit e93248ddd2
3 files changed
+13 -5

No files matched your search

+2
View File
@@ -1055,7 +1055,9 @@ void D_RegisterClientCommands(void)
CV_RegisterVar(&cv_verticallook[i]);
}
CV_RegisterVar(&cv_resyncdemo);
CV_RegisterVar(&cv_demodateformat);
CV_RegisterVar(&cv_showspecstuff);
// ingame object placing
+10 -5
View File
@@ -88,6 +88,8 @@ static UINT8 *metalbuffer = NULL;
static UINT8 *metal_p;
static UINT16 metalversion;
consvar_t cv_resyncdemo = {"resyncdemo", "On", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
// extra data stuff (events registered this frame while recording)
static struct {
UINT8 flags; // EZT flags
@@ -1102,11 +1104,14 @@ void G_ConsGhostTic(INT32 playernum)
CONS_Alert(CONS_WARNING, "Demo playback has desynced (player %s)!\n", player_names[playernum]);
demosynced = false;
P_UnsetThingPosition(testmo);
testmo->x = oldghost[playernum].x;
testmo->y = oldghost[playernum].y;
P_SetThingPosition(testmo);
testmo->z = oldghost[playernum].z;
if (cv_resyncdemo.value)
{
P_UnsetThingPosition(testmo);
testmo->x = oldghost[playernum].x;
testmo->y = oldghost[playernum].y;
P_SetThingPosition(testmo);
testmo->z = oldghost[playernum].z;
}
if (abs(testmo->z - testmo->floorz) < 4*FRACUNIT)
testmo->z = testmo->floorz; // Sync players to the ground when they're likely supposed to be there...
+1
View File
@@ -29,6 +29,7 @@ extern savebuffer_t demobuf;
// demoplaying back and demo recording
extern consvar_t cv_recordmultiplayerdemos, cv_netdemosyncquality, cv_maxdemosize, cv_demochangemap;
extern consvar_t cv_demodateformat;
extern consvar_t cv_resyncdemo;
// Publicly-accessible demo vars
struct demovars_s {