Fix PSP Deadzones

This commit is contained in:
2025-11-09 19:19:36 -06:00
parent e2ce809762
commit ec324e02f2
6 changed files with 17 additions and 23 deletions

View File

@@ -81,21 +81,15 @@ void entityWalk(entity_t *entity, const entitydir_t direction) {
// TODO: Map bounds in way?
// Entity in way?
entity_t *start = ENTITIES;
entity_t *other = ENTITIES;
do {
if(
start == entity ||
entity->type == ENTITY_TYPE_NULL ||
start->position.x != newX ||
start->position.y != newY ||
start->position.z != entity->position.z
) {
start++;
continue;
}
if(other == entity) continue;
if(other->type == ENTITY_TYPE_NULL) continue;
if(other->position.x != newX) continue;
if(other->position.y != newY) continue;
if(other->position.z != entity->position.z) continue;
return;// Blocked
} while(start < &ENTITIES[ENTITY_COUNT]);
} while(++other, other < &ENTITIES[ENTITY_COUNT]);
// Move.
entity->position.x = newX;

View File

@@ -10,7 +10,7 @@
#include "npc.h"
typedef enum {
ENTITY_TYPE_NULL,
ENTITY_TYPE_NULL = 0,
ENTITY_TYPE_PLAYER,
ENTITY_TYPE_NPC,