From 5e2f752c7e06918d193da33b5c85f5c88e3752f7 Mon Sep 17 00:00:00 2001 From: Squirrel Modeller Date: Thu, 9 Apr 2026 15:14:36 +0200 Subject: [PATCH] fix: typo, remove old method --- src/player.c | 15 --------------- src/player.h | 2 +- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/src/player.c b/src/player.c index 9fb41f0..6e51f5d 100644 --- a/src/player.c +++ b/src/player.c @@ -47,21 +47,6 @@ Enemy *player_find_enemy_at(Enemy *enemies, int count, int x, int y) { return NULL; } -int player_move(Player *p, Vec2 direction, Map *map, Enemy *enemies, int enemy_count) { - MoveResult result = try_move_entity(&p->position, direction, map, p, enemies, enemy_count, true); - if (result != MOVE_RESULT_MOVED) - return 0; - - p->step_count += 1; - if (p->step_count % REGEN_STEP_INTERVAL == 0 && p->hp < p->max_hp && - !combat_has_effect(p->effects, p->effect_count, EFFECT_POISON) && - !combat_has_effect(p->effects, p->effect_count, EFFECT_BLEED) && - !combat_has_effect(p->effects, p->effect_count, EFFECT_BURN)) { - p->hp += 1; - } - return 1; -} - void player_on_move(Player *p) { p->step_count += 1; if (p->step_count % REGEN_STEP_INTERVAL == 0 && p->hp < p->max_hp && diff --git a/src/player.h b/src/player.h index 79ce091..290806a 100644 --- a/src/player.h +++ b/src/player.h @@ -6,7 +6,7 @@ // Initialize player at position void player_init(Player *p, int x, int y); -// Apply status effect, healing ect +// Apply status effects, healing, etc void player_on_move(Player *p); // Find a living enemy at tile (x, y); returns NULL if none