Realmatch dComIfGp_event_runCheck inline

dComIfGp_event_runCheck's return type being different from the inner inline runCheck's return type apparently causes the compiler to double up the g_dComIfG_gameInfo load in certain functions.

And also fix dComIfGp_event_chkEventFlag which had the same issue.
This commit is contained in:
LagoLunatic
2024-02-02 20:34:16 -05:00
parent b6c878a652
commit b46e897826
7 changed files with 15 additions and 31 deletions
+3 -5
View File
@@ -914,11 +914,9 @@ void daAgb_c::FlagsSend(u32 stage_type) {
if (dKyw_gbwind_use_check()) {
mFlags.field_0xb_6 = 1;
s16 r3;
// Fakematch: using the dComIfGp_event_runCheck inline breaks the match
// if (dComIfGp_event_runCheck() && (dComIfGp_evmng_startCheck("TACT_WINDOW2_SHIP") || dComIfGp_evmng_startCheck("TACT_WINDOW2"))) {
if (g_dComIfG_gameInfo.play.getEvent().runCheck() &&
(dComIfGp_evmng_startCheck("TACT_WINDOW2_SHIP") || dComIfGp_evmng_startCheck("TACT_WINDOW2")))
{
if (dComIfGp_event_runCheck() &&
(dComIfGp_evmng_startCheck("TACT_WINDOW2_SHIP") || dComIfGp_evmng_startCheck("TACT_WINDOW2"))
) {
r3 = field_0x658;
} else {
cXyz* wind_vec = dKyw_get_wind_vec();