mirror of
https://github.com/zeldaret/tww.git
synced 2026-07-08 13:46:21 -04:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user