mirror of
https://github.com/zeldaret/tww.git
synced 2026-08-19 13:24:12 -04:00
Fix weird gameInfo loads caused by casts within inlines
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user