Fix fakematch reuse of var in getLayerNo

Turns out that a double ternary has different codegen than if+else+ternary
This commit is contained in:
LagoLunatic
2025-03-10 20:05:52 -04:00
parent 7a8b7bfc95
commit 6c4ce7ec80
+3 -6
View File
@@ -185,12 +185,9 @@ void dComIfG_play_c::itemInit() {
int dComIfG_play_c::getLayerNo(int i_roomNo) {
int stageLayer = dComIfGp_getStartStageLayer();
if (stageLayer < 0) {
int layer = dKy_getdaytime_hour();
if (dKy_checkEventNightStop()) {
layer = 1;
} else {
layer = (layer >= 6 && layer < 18) ? 0 : 1;
}
int hour = dKy_getdaytime_hour();
int layer = dKy_checkEventNightStop() ? 1 :
hour >= 6 && hour < 18 ? 0 : 1;
if (strcmp(dComIfGp_getStartStageName(), "sea") == 0) {
if (i_roomNo == dIsleRoom_OutsetIsland_e) {