Code edit to the previous commit

This commit is contained in:
NovaRain
2026-07-16 11:07:29 +08:00
parent 0fe319a664
commit e7337befb4
+6 -6
View File
@@ -136,12 +136,12 @@ static void ElevatorsInit() {
static long __fastcall Check4EscKey(long type, long map) {
fo::ElevatorExit* exits = (Inited) ? elevatorExits[type] : fo::var::retvals[type];
long elev = fo::var::map_elevation;
long i = 0;
do {
if (exits[i].id == map && exits[i].elevation == elev) break;
} while (++i < exitsPerElevator);
return i; // exit index
for (long i = 0; i < exitsPerElevator; i++) {
if (exits[i].id == map && exits[i].elevation == elev) {
return i; // exit index
}
}
return 0;
}
static __declspec(naked) void elevator_select_hack() {