mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-23 00:12:27 +00:00
Merge branch 'staffsync-bodge' into 'master'
Disable PR_ITEM_DEBRIS detections in staffsync See merge request kart-krew-dev/ring-racers-internal!2909
This commit is contained in:
commit
e3067e8a09
1 changed files with 33 additions and 7 deletions
|
|
@ -303,18 +303,39 @@ boolean G_ConsiderEndingDemoRead(void)
|
|||
}
|
||||
|
||||
// Demo failed sync during a sync test! Log the failure to be reported later.
|
||||
static void G_FailStaffSync(staffsync_reason_t reason, UINT32 extra)
|
||||
static boolean G_FailStaffSync(staffsync_reason_t reason, UINT32 extra)
|
||||
{
|
||||
if (demo.attract != DEMO_ATTRACT_OFF) // Don't shout about RNG desyncs in titledemos
|
||||
return false;
|
||||
|
||||
if (!staffsync)
|
||||
return;
|
||||
return true;
|
||||
|
||||
if (staffsync_results[staffsync_failed].reason != 0)
|
||||
return;
|
||||
return false;
|
||||
|
||||
if (reason == SYNC_RNG)
|
||||
{
|
||||
switch (extra)
|
||||
{
|
||||
case PR_ITEM_DEBRIS:
|
||||
case PR_RANDOMAUDIENCE:
|
||||
case PR_VOICES:
|
||||
case PR_DECORATION:
|
||||
case PR_RANDOMANIM:
|
||||
CONS_Printf("[!] Ignored desync from RNG class %d\n", extra);
|
||||
return false;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
staffsync_results[staffsync_failed].map = gamemap;
|
||||
memcpy(&staffsync_results[staffsync_failed].name, player_names[consoleplayer], sizeof(player_names[consoleplayer]));
|
||||
staffsync_results[staffsync_failed].reason = reason;
|
||||
staffsync_results[staffsync_failed].extra = extra;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void G_ReadDemoExtraData(void)
|
||||
|
|
@ -486,11 +507,16 @@ void G_ReadDemoExtraData(void)
|
|||
|
||||
if (demosynced)
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, "Demo playback has desynced (RNG class %d)!\n", i);
|
||||
G_FailStaffSync(SYNC_RNG, i);
|
||||
if (G_FailStaffSync(SYNC_RNG, i))
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, "Demo playback has desynced (RNG class %d)!\n", i);
|
||||
storesynced = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
storesynced = false;
|
||||
}
|
||||
|
||||
storesynced = false;
|
||||
}
|
||||
}
|
||||
demosynced = storesynced;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue