Fix weird gameInfo loads caused by casts within inlines

This commit is contained in:
LagoLunatic
2025-03-31 14:07:20 -04:00
parent 3950d700a2
commit 41621f4e72
5 changed files with 20 additions and 13 deletions
+11 -2
View File
@@ -927,15 +927,24 @@ BOOL daTbox_c::actionDemo() {
/* Fakematch - the temp variable for play is definitely not right. */
s16 eventId = eventInfo.getEventId();
dComIfG_play_c* play = &g_dComIfG_gameInfo.play;
if (dComIfGp_evmng_endCheck(eventId)) {
// if (dComIfGp_evmng_endCheck(eventInfo.getEventId())) {
setAction(&daTbox_c::actionWait);
// Fakematch:
// When dComIfGp_event_reset is used here, the way gameInfo is loaded matches the demo
// binary, but not the release binary. So the demo's debug map may be misleading here?
// But daTbox_c::actionDemo in TP debug still calls dComIfGp_event_reset, so maybe not?
// Also, putting a cast like (void) on dComIfGp_event_reset() slightly improves the
// codegen, but it's still slightly wrong.
// dComIfGp_event_reset();
play->getEvent().reset();
dKy_set_allcol_ratio(1.0f);
flagOff(daTboxFlg_UNK_08 | daTboxFlg_OPENING_e);
// The fakematch also might be related to dComIfGp_event_setItemPartner? Removing this
// call fixes the load above.
dComIfGp_event_setItemPartner(NULL);
if (mSmokeEmitter != NULL) {