Raised This Month: $ Target: $400
 0% 

[L4D2] Client-sided Survivor Ragdolls


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Shadowysn
Senior Member
Join Date: Sep 2015
Location: Location:
Plugin ID:
6807
Plugin Version:
1.1.5
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    16 
    Plugin Description:
    Enable survivor ragdolls on all deaths.
    Old 11-15-2019 , 05:19   [L4D2] Client-sided Survivor Ragdolls
    Reply With Quote #1

    First plugin released into the public.

    This is like Mr. Zero's Restore Ragdoll plugin, except it functions on ALL deaths, including suicides.
    You can also choose to make the static death model invisible, remove it, or do nothing to the body.

    It also comes with manually spawning the ragdolls yourself, for funsies.
    The plugin supports L4D1, but only has the feature to manual-spawn ragdolls.

    There's a toggleable function to stop m_isFallingFromLedge deaths from removing the static model.
    However, it uses the same method Zero used to know if a player will die, so it will not be able to detect suicides/slays.
    But survivors that were falling are already going to die anyway, and it works for just falling to your death, so it shouldn't be much of a problem to keep this feature on.

    -= ConVars/Commands =-
    sm_custom_survivor_ragdoll 1 - min:0/max:1
    ^ Toggle usage of non-ledge based ragdoll deaths.

    sm_c_survivor_ragdoll_staticbody 0 - min:0/max:2
    ^ 0 - Make static body invisible. 1 - Remove static body. 2 - Do nothing. 3 - Make static body transparent.

    sm_c_survivor_ragdoll_ledge 1 - min:0/max:1
    ^ Toggle preventing ledge deaths from making victims unrevivable.

    sm_c_survivor_ragdoll_nolimit 0 - min:0/max:1
    ^ 0 - Use game's preferred ragdoll limits. 1 - Use CI ragdoll limits. (Beware - this could wreak havoc on older computers!)

    sm_c_survivor_ragdoll_dual_drop 1 - min:0/max:1
    ^ Toggle whether players should drop their extra pistol upon death.

    sm_ragdoll = Spawn a client ragdoll on yourself.

    -= Further Info =-

    - The plugin automatically adds a function to the admin menu called 'Spawn ragdoll on' that lets you manually spawn a ragdoll on a chosen player from it's list.
    - <BUG> Manually spawning a ragdoll on anyone has the chance to make them invisible on one or more client's ends. Could possibly be caused by the method of setting the ragdoll's player netprop to the chosen player.


    -= Releases =-
    Code:
    Version 1.1.5
    - Some optimization and refactoring of previous code ugliness, and removed useless commented code.
    Version 1.1.4
    - Preventing ledge-hanging fall deaths from removing the death model now uses the method Zero used to detect whether a survivor is going to die.
    This lets survivors play the falling animation properly again, but also results in inaccuracies with slays/suicides whilst falling.
    Version 1.1.3
    - Fixed 'Spawn ragdoll on' not getting added to admin menu upon plugin's first load on a new map. Definitely.
    Version 1.1.2
    - Fixed a bug with sm_c_survivor_ragdoll_dual_drop that made non-dual wielding players drop an extra pistol after they die and get revived.
    Version 1.1.1
    - Added sm_c_survivor_ragdoll_dual_drop.
    Version 1.1.0
    - Attempt to fix 'Spawn ragdoll on' not getting added to admin menu upon plugin's first load on a new map.
    Version 1.0.9
    - Added sm_c_survivor_ragdoll_nolimit.
    Version 1.0.7
    - Used PostThinkPost hook instead of PreThink on Lux's suggestion.
    - Edited code's replacement for falling-off-after-hanging deaths.
    Version 1.0.6
    - Usage of m_iDeathPose and m_iDeathFrame now results in (almost) proper ragdoll deaths.
    Version 1.0.5
    - Used a better system of checking whether the game spawned a ledge ragdoll as opposed to a boolean.
    - Minor changes to the code.
    Version 1.0.1
    - Updated various text in the plugin.
    Version 1.0.0
    - Initial release.
    Attached Files
    File Type: sp Get Plugin or Get Source (L4D2CSRagdoll.sp - 861 views - 15.9 KB)
    __________________
    ragdoll spam, that is all

    Steam profile, where I game, obviously.
    Youtube channel, where I do Stick Death Maze animations and some other stuff.
    no plugin requests, sorry


    My Plugins:
    -search list-
    Modified Plugins:
    1 | 2 | 3 | 4

    Last edited by Shadowysn; 12-02-2022 at 06:28. Reason: Updated to Version 1.1.5
    Shadowysn is offline
    Dreyson
    Member
    Join Date: Nov 2019
    Location: Utah
    Old 11-18-2019 , 17:42   Re: [L4D2] Consistent Client-sided Survivor Ragdolls
    Reply With Quote #2

    Hi, i am new to the forums and i know how to install plugins just that do i click install plugin or get source? Thanks!
    Dreyson is offline
    Dreyson
    Member
    Join Date: Nov 2019
    Location: Utah
    Old 11-18-2019 , 20:43   Re: [L4D2] Consistent Client-sided Survivor Ragdolls
    Reply With Quote #3

    Thanks but the plugin does not work? i put it in plugins and no one will ragdoll and the sm_ragdoll wont work
    Dreyson is offline
    Shadowysn
    Senior Member
    Join Date: Sep 2015
    Location: Location:
    Old 11-18-2019 , 21:59   Re: [L4D2] Consistent Client-sided Survivor Ragdolls
    Reply With Quote #4

    Quote:
    Originally Posted by Dreyson View Post
    Thanks but the plugin does not work? i put it in plugins and no one will ragdoll and the sm_ragdoll wont work
    Have you made sure it's loaded in? Put sm plugins list in the console to get the list of currently loaded plugins.

    If it isn't then do sm plugins load L4D2CSRagdoll in the console.
    __________________
    ragdoll spam, that is all

    Steam profile, where I game, obviously.
    Youtube channel, where I do Stick Death Maze animations and some other stuff.
    no plugin requests, sorry


    My Plugins:
    -search list-
    Modified Plugins:
    1 | 2 | 3 | 4

    Last edited by Shadowysn; 11-18-2019 at 22:00.
    Shadowysn is offline
    Dreyson
    Member
    Join Date: Nov 2019
    Location: Utah
    Old 11-18-2019 , 22:18   Re: [L4D2] Consistent Client-sided Survivor Ragdolls
    Reply With Quote #5

    when i tried to load it it gave me this console error


    [SM] Plugin L4D2CSRagdoll.smx failed to load: Native "RemoveEntity" was not found.
    Dreyson is offline
    Shadowysn
    Senior Member
    Join Date: Sep 2015
    Location: Location:
    Old 11-18-2019 , 22:27   Re: [L4D2] Consistent Client-sided Survivor Ragdolls
    Reply With Quote #6

    Quote:
    Originally Posted by Dreyson View Post
    when i tried to load it it gave me this console error


    [SM] Plugin L4D2CSRagdoll.smx failed to load: Native "RemoveEntity" was not found.
    Eh? That shouldn't happen...
    Are you using an older version of Sourcemod? The current version as of now is 1.10.
    If you don't want to upgrade, you can download the source plugin file, go to the scripting folder in sourcemod, and drag-and-drop the .sp file onto compile.exe.
    This should create an .smx in the scripting/compiled folder, compiled in the version of sourcemod you're using. All you need to do next is to move the smx to the plugins folder.
    __________________
    ragdoll spam, that is all

    Steam profile, where I game, obviously.
    Youtube channel, where I do Stick Death Maze animations and some other stuff.
    no plugin requests, sorry


    My Plugins:
    -search list-
    Modified Plugins:
    1 | 2 | 3 | 4

    Last edited by Shadowysn; 11-18-2019 at 22:31.
    Shadowysn is offline
    Dreyson
    Member
    Join Date: Nov 2019
    Location: Utah
    Old 11-20-2019 , 22:38   Re: [L4D2] Consistent Client-sided Survivor Ragdolls
    Reply With Quote #7

    That worked, Thanks!

    Also i found out that you can defib people with the invisible static model 1 or something, but the defib model is the static model just invisible but it does not follow with the ragdoll it just stays at where the player originally died
    Dreyson is offline
    Shadowysn
    Senior Member
    Join Date: Sep 2015
    Location: Location:
    Old 11-21-2019 , 00:37   Re: [L4D2] Consistent Client-sided Survivor Ragdolls
    Reply With Quote #8

    Quote:
    Originally Posted by Dreyson View Post
    That worked, Thanks!

    Also i found out that you can defib people with the invisible static model 1 or something, but the defib model is the static model just invisible but it does not follow with the ragdoll it just stays at where the player originally died
    Yeah, I made the plugin function like that by default. Why sacrifice one or the other when you can enjoy the visuals of a flailing body and also bring them back to life?

    Unfortunately, I cannot remove the ragdoll. Once it's spawned for people, it's no longer tied to the server and cannot be interacted with the latter anymore.
    It's also the reason I cannot make the static body follow the ragdoll.
    __________________
    ragdoll spam, that is all

    Steam profile, where I game, obviously.
    Youtube channel, where I do Stick Death Maze animations and some other stuff.
    no plugin requests, sorry


    My Plugins:
    -search list-
    Modified Plugins:
    1 | 2 | 3 | 4

    Last edited by Shadowysn; 11-21-2019 at 03:36.
    Shadowysn is offline
    Lux
    Veteran Member
    Join Date: Jan 2015
    Location: Cat
    Old 11-22-2019 , 02:42   Re: [L4D2] Consistent Client-sided Survivor Ragdolls
    Reply With Quote #9

    Quote:
    <BUG> Manually spawning a ragdoll on specific infected (like the hunter) makes them invisible. I have no idea why it does that.
    Likely due to m_hRagdoll being transmitted to other clients causing prediction to hide infected player entity, should work fine if you set m_hRagdoll to -1, but will not have the owner as the client then.

    UpdateLedgeHang is done in PostThink, so your prethink hook is 1tick behind on checks, it maybe slite better to use PostThinkPost hook, if you want the checking to be in the sameupdate as ledge release.

    CTerrorPlayer::PostThink()
    CTerrorPlayer::UpdateLedgeHang()

    Spoiler
    __________________
    Connect
    My Plugins: KlickME
    [My GitHub]

    Commission me for L4D
    Lux is offline
    Shadowysn
    Senior Member
    Join Date: Sep 2015
    Location: Location:
    Old 11-22-2019 , 03:26   Re: [L4D2] Consistent Client-sided Survivor Ragdolls
    Reply With Quote #10

    Quote:
    Originally Posted by Lux View Post
    Likely due to m_hRagdoll being transmitted to other clients causing prediction to hide infected player entity, should work fine if you set m_hRagdoll to -1, but will not have the owner as the client then.

    UpdateLedgeHang is done in PostThink, so your prethink hook is 1tick behind on checks, it maybe slite better to use PostThinkPost hook, if you want the checking to be in the sameupdate as ledge release.

    CTerrorPlayer::PostThink()
    CTerrorPlayer::UpdateLedgeHang()

    Spoiler
    But the only instance I've ever set the newly-created ragdoll to the client's m_hRagdoll netprop is locked behind checks that only do their action if the player is dead and there isn't another ragdoll of the client.

    I'm suspecting that the m_hPlayer netprop on the ragdoll is the most likely cause for this, as before that netprop was even used the Hunters didn't have the bug when I create a ragdoll on them.

    Thanks for the info, I guess I'll try PostThinkPost sometime.
    It sucks to not have a decompiler for IDA Free.
    __________________
    ragdoll spam, that is all

    Steam profile, where I game, obviously.
    Youtube channel, where I do Stick Death Maze animations and some other stuff.
    no plugin requests, sorry


    My Plugins:
    -search list-
    Modified Plugins:
    1 | 2 | 3 | 4
    Shadowysn is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 17:34.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode