Boss fight is now working. Turned out to be something really dumb.

This commit is contained in:
Zed A. Shaw 2025-12-19 12:04:51 -05:00
parent 4958f24c1d
commit 4b4f9b3916
8 changed files with 154 additions and 127 deletions

View file

@ -35,22 +35,26 @@ int main(int argc, char* argv[]) {
while(main.active()) {
main.render();
// BUG: need to sort out how to deal with this in the FSM
if(main.in_state(gui::State::IDLE)
|| main.in_state(gui::State::BOSS_FIGHT)
|| main.in_state(gui::State::LOOTING)
|| main.in_state(gui::State::IN_COMBAT))
{
if(main.autowalking) {
walker.autowalk();
} else {
main.handle_keyboard_mouse();
if(main.in_state(gui::State::BOSS_FIGHT)) {
main.handle_boss_fight_events();
} else {
// BUG: need to sort out how to deal with this in the FSM
if(main.in_state(gui::State::IDLE)
|| main.in_state(gui::State::LOOTING)
|| main.in_state(gui::State::CUT_SCENE_PLAYING)
|| main.in_state(gui::State::IN_COMBAT))
{
if(main.autowalking) {
walker.autowalk();
} else {
main.handle_keyboard_mouse();
}
} else{
main.event(game::Event::TICK);
}
} else{
main.event(game::Event::TICK);
}
main.handle_world_events();
main.handle_world_events();
}
}
return 0;