From 16b304238ebf7bac34eb2bbd7ee1e4b5f4706779 Mon Sep 17 00:00:00 2001
From: zaCade <zaCade@hotmail.com>
Date: Mon, 8 Apr 2019 12:24:10 +0200
Subject: [PATCH] entWatch4: Register spawned items on late load.

---
 _entWatch4/scripting/entWatch-core.sp | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/_entWatch4/scripting/entWatch-core.sp b/_entWatch4/scripting/entWatch-core.sp
index 3cd386db..1fc45de3 100644
--- a/_entWatch4/scripting/entWatch-core.sp
+++ b/_entWatch4/scripting/entWatch-core.sp
@@ -165,6 +165,15 @@ public void OnMapStart()
 		while (hConfig.GotoNextKey());
 	}
 
+	if (g_bLate)
+	{
+		int entity = INVALID_ENT_REFERENCE;
+		while ((entity = FindEntityByClassname(entity, "*")) != INVALID_ENT_REFERENCE)
+		{
+			OnEntitySpawned(entity);
+		}
+	}
+
 	delete hConfig;
 	return;
 }