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:
		@@ -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);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user