From 88aed11d988bec0328c8d0031fe34e5b8f8749b1 Mon Sep 17 00:00:00 2001 From: Dominic Masters Date: Fri, 26 Jun 2026 14:42:35 -0500 Subject: [PATCH] Blocked path --- src/dusk/rpg/entity/npc/npcpath.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/dusk/rpg/entity/npc/npcpath.c b/src/dusk/rpg/entity/npc/npcpath.c index f0b02b6c..e6f235b8 100644 --- a/src/dusk/rpg/entity/npc/npcpath.c +++ b/src/dusk/rpg/entity/npc/npcpath.c @@ -8,13 +8,11 @@ #include "npc.h" #include "rpg/entity/entity.h" #include "rpg/overworld/worldpos.h" -#include "time/time.h" void npcPathInit(npc_t *npc) { npcpath_t *path = &npc->moveData.path; path->count = 0; path->index = 0; - path->blockedTimer = 0.0f; } void npcPathMovement(entity_t *entity) { @@ -42,17 +40,5 @@ void npcPathMovement(entity_t *entity) { dir = pos.z < target->z ? ENTITY_DIR_NORTH : ENTITY_DIR_SOUTH; } - worldpos_t prevPos = entity->position; entityWalk(entity, dir); - - if(worldPosIsEqual(entity->position, prevPos)) { - // Blocked - wait before skipping so temporary blockers can move away. - path->blockedTimer += TIME.delta; - if(path->blockedTimer >= NPC_PATH_BLOCKED_TIMEOUT) { - path->index = (path->index + 1) % path->count; - path->blockedTimer = 0.0f; - } - } else { - path->blockedTimer = 0.0f; - } }