diff --git a/src/p_maputl.cpp b/src/p_maputl.cpp index 552889c48..5fa8aa2f2 100644 --- a/src/p_maputl.cpp +++ b/src/p_maputl.cpp @@ -459,6 +459,8 @@ void AActor::LinkToWorld(bool spawningmapthing, sector_t *sector) P_CollectConnectedGroups(Sector->PortalGroup, Pos(), Top(), radius, check); + BlockNode = NULL; + FBlockNode **alink = &this->BlockNode; for (int i = -1; i < (int)check.Size(); i++) { DVector3 pos = i==-1? Pos() : PosRelative(check[i] & ~FPortalGroupArray::FLAT); @@ -470,11 +472,9 @@ void AActor::LinkToWorld(bool spawningmapthing, sector_t *sector) if (x1 >= bmapwidth || x2 < 0 || y1 >= bmapheight || y2 < 0) { // thing is off the map - BlockNode = NULL; } else { // [RH] Link into every block this actor touches, not just the center one - FBlockNode **alink = &this->BlockNode; x1 = MAX(0, x1); y1 = MAX(0, y1); x2 = MIN(bmapwidth - 1, x2);