Fixed the ragdoll module unintentionally removing other valid entities if a ragdoll was attempted to be removed after the round restarted.

This commit is contained in:
Andrew 2011-06-24 17:01:30 -07:00
parent 70d86f2d71
commit d2ea788500

View File

@ -152,6 +152,14 @@ public Action:RagdollTimer(Handle:timer, any:ragdoll)
return; 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. // Remove the ragdoll.
RagdollRemove(ragdoll); RagdollRemove(ragdoll);
} }