[L4D2] Remove survivor dead body
I would like to remove a survivor's dead body with a simple condition: It can be done at any time, without a warning, not only after the dead or in dead_survivor_visible event.
|
Re: [L4D2] Remove survivor dead body
I tried to extract the dead body with an SDKCall which I searched in pseudo code, 0 success since it uses a method I fail to understand to retrieve it.
Code:
CBaseEntity *__cdecl CItemDefibrillator::OnActionComplete(CItemDefibrillator *this, CTerrorPlayer *a2, CBaseEntity *a3) |
Re: [L4D2] Remove survivor dead body
I add function to replace deathmodel for revive fix in post https://forums.alliedmods.net/showpo...&postcount=184
You can try to modify extension and add function for deleting deathmodel entity. |
Re: [L4D2] Remove survivor dead body
Quote:
Maybe you can add a native to retrieve the deathmodel entity in your extension? |
Re: [L4D2] Remove survivor dead body
Quote:
PHP Code:
Can't you check your conditions for removal of deathmodel in sourcemod? |
Re: [L4D2] Remove survivor dead body
PHP Code:
|
Re: [L4D2] Remove survivor dead body
Quote:
If the entity is not valid, FindEntityByClassname reports -1. The while loop specificly only checks for valid entities (return value >= 0) Edit: To clarify. If you check that the return value of FindEntityByClassname is >= 0 on the entity, (which is done in this while loop), you don't have to add any aditonal IsValidEdict or IsValidEntity checks. To avoid crashes, always check the return value and don't remove the entity with RemoveEdict. Example on how to use it on a single entity. Code:
int entity = FindEntityByClassname(-1, "this_entities_name"); |
Re: [L4D2] Remove survivor dead body
There are times when the entity is valid and invalid at the same time. This is due to said entity being in the process of removal.
Example: Deleting an entity that is about to be removed automatically from the map. PHP Code:
|
Re: [L4D2] Remove survivor dead body
Quote:
What happens if we have 2 plugins trying to delete the exact same entity model at the same time? Would it still delete the entity on pluginA and pluginB would maybe just ignore it? Or does the server crash? |
Re: [L4D2] Remove survivor dead body
Quote:
But if eyal is using a repeating timer, he might need to do that or... stop the timer during OnMapEnd and restart it on OnMapStart. Quote:
Manually spawned ragdolls before game crashed when it reached 10-20 total. |
All times are GMT -4. The time now is 18:23. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.