fix BlockingMobj ignoring the GC and possibly becoming a stale pointer

This commit is contained in:
Ricardo Luís Vaz Silva 2025-07-24 06:11:25 -03:00
commit 9b44f2315d
2 changed files with 2 additions and 1 deletions

View file

@ -1313,7 +1313,7 @@ public:
int DesignatedTeam; // Allow for friendly fire cacluations to be done on non-players.
int friendlyseeblocks; // allow to override friendly search distance calculation
AActor *BlockingMobj; // Actor that blocked the last move
TObjPtr<AActor*> BlockingMobj; // Actor that blocked the last move
line_t *BlockingLine; // Line that blocked the last move
line_t *MovementBlockingLine; // Line that stopped the Actor's movement in P_XYMovement
sector_t *Blocking3DFloor; // 3D floor that blocked the last move (if any)

View file

@ -178,6 +178,7 @@ IMPLEMENT_POINTERS_START(AActor)
IMPLEMENT_POINTER(goal)
IMPLEMENT_POINTER(LastLookActor)
IMPLEMENT_POINTER(Inventory)
IMPLEMENT_POINTER(BlockingMobj)
IMPLEMENT_POINTER(LastHeard)
IMPLEMENT_POINTER(master)
IMPLEMENT_POINTER(Poisoner)