From d2ea788500d2e88e64fa17949fa3ccdb8ffe0de4 Mon Sep 17 00:00:00 2001 From: Andrew Date: Fri, 24 Jun 2011 17:01:30 -0700 Subject: [PATCH] Fixed the ragdoll module unintentionally removing other valid entities if a ragdoll was attempted to be removed after the round restarted. --- src/zr/visualeffects/ragdoll.inc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/zr/visualeffects/ragdoll.inc b/src/zr/visualeffects/ragdoll.inc index ea1c9f1..8769143 100644 --- a/src/zr/visualeffects/ragdoll.inc +++ b/src/zr/visualeffects/ragdoll.inc @@ -152,6 +152,14 @@ public Action:RagdollTimer(Handle:timer, any:ragdoll) return; } + // Make sure this edict is still a ragdoll and not become a new valid entity. + decl String:classname[64]; + GetEdictClassname(ragdoll, classname, sizeof(classname)); + if (!StrEqual(classname, "cs_ragdoll")) + { + return; + } + // Remove the ragdoll. RagdollRemove(ragdoll); }