fix: move action setter outside null guard

This commit is contained in:
Squirrel Modeller 2026-04-09 15:22:50 +02:00
commit 7905ace2ca
No known key found for this signature in database
GPG key ID: C9FBA7B8C387BF70

View file

@ -448,8 +448,8 @@ static int handle_movement_input(GameState *gs) {
if (result == MOVE_RESULT_MOVED) {
if (target != NULL) {
player_on_move(&gs->player);
action = 1;
}
action = 1;
} else if (result == MOVE_RESULT_BLOCKED_ENEMY) {
target = player_find_enemy_at(gs->enemies, gs->enemy_count, new_x, new_y);
player_attack(&gs->player, target);