Skip to content

Commit d90fa76

Browse files
committed
1 parent a9c8bf5 commit d90fa76

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

gish/src/main/cpp/Gish/game/game.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ int touchcontrols = 0;
7676
int cache_fix = 0;
7777
int disable_frame = 0;
7878
float z_zoom = 10.0f;
79+
int fix_boss_logic_when_lights_off = 0;
7980

8081
int fps, fps_cache = 0, fps_renew = 0, fps_mean;
8182

@@ -427,7 +428,7 @@ void gameloop(void)
427428

428429
if (lighting_enabled) {
429430
setupframelighting();
430-
} else if (game.levelnum == 13) { // cave6.lvl boss
431+
} else if (fix_boss_logic_when_lights_off) { // cave6.lvl boss
431432
setupframelighting_fix_cave6_boss();
432433
}
433434

gish/src/main/cpp/Gish/game/game.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ extern int lighting_enabled;
8989
extern int shadow_enabled;
9090
extern int cache_fix;
9191
extern int disable_frame;
92+
extern int fix_boss_logic_when_lights_off;
9293
extern float z_zoom;
9394

9495
#endif /* GISH_GAME_GAME_H */

gish/src/main/cpp/Gish/game/level.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ void loadlevel(char *filename)
297297
FILE *fp;
298298

299299
x=0x17AF2E03;
300+
fix_boss_logic_when_lights_off = 0;
300301

301302
changeddir=chdir("level");
302303

@@ -344,6 +345,7 @@ void loadlevel(char *filename)
344345
{ 0.200000, 0.600000, 0.200000}
345346
};
346347
memcpy(level.ambient, ambient, sizeof(ambient));
348+
fix_boss_logic_when_lights_off = 1;
347349
}
348350
}
349351

@@ -474,6 +476,7 @@ void loadlevel(char *filename)
474476
{ 0.200000, 0.600000, 0.200000}
475477
};
476478
memcpy(level.ambient, ambient, sizeof(ambient));
479+
fix_boss_logic_when_lights_off = 1;
477480
}
478481
}
479482

@@ -601,6 +604,7 @@ void loadlevel(char *filename)
601604
{ 0.200000, 0.600000, 0.200000}
602605
};
603606
memcpy(level.ambient, ambient, sizeof(ambient));
607+
fix_boss_logic_when_lights_off = 1;
604608
}
605609
}
606610

0 commit comments

Comments
 (0)