diff --git a/source/core/actorlist.cpp b/source/core/actorlist.cpp
index 4955bc2a0..50f28228a 100644
--- a/source/core/actorlist.cpp
+++ b/source/core/actorlist.cpp
@@ -396,6 +396,10 @@ void DCoreActor::OnDestroy()
 		assert(prevSect == nullptr && nextSect == nullptr);
 	}
 	Numsprites--;
+	
+	if (wallspriteinfo) delete wallspriteinfo;
+	wallspriteinfo = nullptr;
+
 }
 
 //==========================================================================
diff --git a/source/core/coreactor.h b/source/core/coreactor.h
index 669fed1a2..00b1c51ad 100644
--- a/source/core/coreactor.h
+++ b/source/core/coreactor.h
@@ -10,6 +10,19 @@ enum
 	MAXSTATUS = 1024
 };
 
+struct FWallSpriteDesc
+{
+	walltype* wall;
+	float offsetOnWall;
+};
+
+// This is for quick determination of walls a wall sprite is attached to.
+struct FWallSpriteInfo
+{
+	tspritetype base;						// this is needed for checking if something has changed.
+	TArray<FWallSpriteDesc> connections[2]; // two lists - for front and back
+};
+
 class DCoreActor : public DObject
 {
 	DECLARE_CLASS(DCoreActor, DObject)
@@ -22,6 +35,7 @@ public:
 	sectortype* link_sector;
 	DCoreActor* prevStat, * nextStat;
 	DCoreActor* prevSect, * nextSect;
+	FWallSpriteInfo* wallspriteinfo; // this is render data but needs to be attached to the actor so it can be found.
 
 	spritetype spr;
 	spriteext_t sprext;