Raised This Month: $51 Target: $400
 12% 

L4D2 - L4D1 Survivors mourn fix (UPDATED 10-12-2020)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
DeathChaos25
Senior Member
Join Date: Jan 2014
Location: Puerto Rico
Plugin ID:
4531
Plugin Version:
1.3
Plugin Category:
General Purpose
Plugin Game:
Left 4 Dead
Plugin Dependencies:
Servers with this Plugin:
 
Plugin Description:
Fixes the bug where L4D1 survivors are unable to mourn each other on the L4D2 set
Old 02-26-2015 , 10:40   L4D2 - L4D1 Survivors mourn fix (UPDATED 10-12-2020)
Reply With Quote #1

About : Very simple plugin, it allows L4D1 survivors to mourn each other on the L4D2 survivor set

How it works :
If a client is looking at a survivor's dead body, we scan the dead body for a model and vocalize accordingly.

This plugin requires scene processor to compile, and the scene processor plugin to function.

CVARs :
Code:
// This file was auto-generated by SourceMod (v1.10.0.6497)
// ConVars for plugin "[L4D2] Survivor Mourn Fix.smx"


// Enable fix for L4D1 survivors saying name of L4D1 survivor that died? 0 = Disable (if using Last Stand talker), 1 = Enable (if using old talker mod or modified talker)
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "2.000000"
enable_death_name_say "1"

// Enable Fix for servers with Ragdoll deaths? 0 = Disable Ragdoll Fix, 1 = Enable Ragdoll Fix
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "2.000000"
enable_ragdoll_fix "0"
Code:
Version 1.0    02-26-2015  (21 Views)
- Initial Release

Version 1.1    03-01-2015
- Added a workaround that enables mourns even when ragdoll deaths are enabled
- Fixed a small oversight where some variables were never reset

Version 1.2    11-17-2015 (2168 views)
- L4D2 Survivors now Mourn L4D1 survivors!
- Plugin partly rewritten so it ACTUALLY works as intended!

Version 1.3    10-12-2020
- Removed forced direct wav voice file calls (fixed by Last Stand)
- Added more checks to fix the bug where a dead survivor was able to mourn
- Added a new cvar due to Last Stand talker changes (delete old cfg file when updating) (see below for cvar explanation)
- If enable_death_name_say is enabled, fixes L4D1 survivor names not being shouted when they die on set 2


Bugs :

Code:
- If both Death Anims restore plugin, and this plugin's own ragdoll fix are both enabled, it may sometimes create 2 death models (harmless, but it happens)
ALL L4D1 survivors are able to mourn each other, even clones, meaning Zoey can mourn for Zoey, Bill mourns Bill, etc

Also with a little added something...

For those who use ragdoll deaths I have attached an edited cfg file with the fix enabled, alternatively, you can run the plugin once, let it automatically create the cfg, and enable the fix there.

THIS PLUGIN REQUIRES l4d_stocks TO COMPILE!

ABOUT "enable_death_name_say" CVAR:

Last Stand update has made a number of changes, one such change is that when a survivor dies, another fellow survivor will no longer shout their name.

This means that this new feature would not fit in well with an unmodified talker from Last Stand, as such it is locked behind a cvar for people who use a talker mod that has this behavior restored, such as Pre Update Talker mod.

Please note that I have tested this new feature but as always, there may be bugs even I don't catch, so please report.
Attached Files
File Type: sp Get Plugin or Get Source ([L4D2] Survivor Mourn Fix.sp - 622 views - 34.0 KB)
File Type: smx [L4D2] Survivor Mourn Fix.smx (16.7 KB, 885 views)
File Type: cfg l4d2_survivor_mourn_fix.cfg (587 Bytes, 815 views)
__________________

Last edited by DeathChaos25; 10-13-2020 at 00:03.
DeathChaos25 is offline
Sev
Veteran Member
Join Date: May 2010
Old 02-26-2015 , 10:48   Re: L4D2 - L4D1 Survivors mourn fix
Reply With Quote #2

For a minute, I thought I saw something in there about it not working with ragdoll deaths...

Then you removed it, which is great.

Cuz I was gonna say...a lot like the medkit defib plugin from panox. I would think it would allow the client to remember where the original death occured and mourn accordingly, since it does that already with ragdolls enabled.

Anyway, good stuff.

Last edited by Sev; 02-26-2015 at 10:48.
Sev is offline
DeathChaos25
Senior Member
Join Date: Jan 2014
Location: Puerto Rico
Old 02-26-2015 , 10:52   Re: L4D2 - L4D1 Survivors mourn fix
Reply With Quote #3

Quote:
Originally Posted by Sev View Post
For a minute, I thought I saw something in there about it not working with ragdoll deaths...

Then you removed it, which is great.

Cuz I was gonna say...a lot like the medkit defib plugin from panox. I would think it would allow the client to remember where the original death occured and mourn accordingly, since it does that already with ragdolls enabled.

Anyway, good stuff.
It actually doesn't, I was just cleaning up the original post and apparently deleted that part.

I'll see what can be done about it, since as far as I know there's no real way of telling who the dead person if they ragdoll (with Sourcemod)

Off the top of my head, the easiest workaround to this would be to find out how to create static death models, and spawn an invisible one upon ragdoll death, except I don't exactly know how to do so, research time!
__________________

Last edited by DeathChaos25; 02-26-2015 at 11:06.
DeathChaos25 is offline
Sev
Veteran Member
Join Date: May 2010
Old 02-26-2015 , 11:11   Re: L4D2 - L4D1 Survivors mourn fix
Reply With Quote #4

I'll just disable ragdolls for a bit. I can live without them for a bit while you might find a way for it to work.

Its just strange to me that it wouldn't.

This plugin aside, when a survivor dies and gets thrown all over the place. The mourns that actually work without this plugin will work where the survivor actually died at, as opposed to where the body actually goes. I would think given it seems all client predicted, that it would work. It's also the same idea with panox medkit for defib plugin. Especially in L4D1, where the ragdolls have more velocity, the plugin would allow the survivors to use the medkit to revive a dead player where they died originally, knowing the body was thrown far away.

Oh well, maybe you'll find something. Fingers crossed.

Last edited by Sev; 02-26-2015 at 11:12.
Sev is offline
DeathChaos25
Senior Member
Join Date: Jan 2014
Location: Puerto Rico
Old 02-26-2015 , 11:27   Re: L4D2 - L4D1 Survivors mourn fix
Reply With Quote #5

Quote:
Originally Posted by Sev View Post
I'll just disable ragdolls for a bit. I can live without them for a bit while you might find a way for it to work.

Its just strange to me that it wouldn't.

This plugin aside, when a survivor dies and gets thrown all over the place. The mourns that actually work without this plugin will work where the survivor actually died at, as opposed to where the body actually goes. I would think given it seems all client predicted, that it would work. It's also the same idea with panox medkit for defib plugin. Especially in L4D1, where the ragdolls have more velocity, the plugin would allow the survivors to use the medkit to revive a dead player where they died originally, knowing the body was thrown far away.

Oh well, maybe you'll find something. Fingers crossed.
what plugin is that?

Maybe I can have a look at the source and find something out.
__________________
DeathChaos25 is offline
Sev
Veteran Member
Join Date: May 2010
Old 02-26-2015 , 11:36   Re: L4D2 - L4D1 Survivors mourn fix
Reply With Quote #6

https://forums.alliedmods.net/showthread.php?t=126741

As the plugin suggests.

You go over the red blinking light (where the survivor originally died) and use the revive feature seen in the plugin.
Sev is offline
DeathChaos25
Senior Member
Join Date: Jan 2014
Location: Puerto Rico
Old 02-27-2015 , 12:07   Re: L4D2 - L4D1 Survivors mourn fix
Reply With Quote #7

So, after a little bit of poking around the API, and looking at other plugins, I found out how to easily spawn a static death model at the player's exact location, so I made a little test to spawn death models of my current character.

PHP Code:
#pragma semicolon 1
#include <sourcemod>
#include <sdktools>

public Plugin:myinfo =
{
    
name "Ragdoll Death Model test",
    
author "DeathChaos25",
    
description "something someting test",
    
version "1.0",
}

public 
OnPluginStart()

    
RegConsoleCmd("sm_spawn"ModelSpawn"ModelSpawn");
}

public 
Action:ModelSpawn(clientargs)
{
    new 
entity;
    new 
String:modelname[128];
    
GetEntPropString(clientProp_Data"m_ModelName"modelname128);
    
    
entity CreateEntityByName("survivor_death_model");
    
SetEntityModel(entitymodelname);
    
    new 
Float:g_Origin[3];
    new 
Float:g_Angle[3];
    
    
GetClientAbsOrigin(clientg_Origin);
    
GetClientAbsAngles(clientg_Angle);
    
    
TeleportEntity(entityg_Origing_AngleNULL_VECTOR);
    
DispatchSpawn(entity);
    
    return 
Plugin_Continue;



As soon as I would spawn one of the L4D1 models the mourn fix would kick in.

Now I need to find out how to make them invisible, and implement them into a CVAR for people who use ragdolls, I'd make it so that on player death a generic invisible static death model with the survivor's model is spawned where they died.

I also want to find out what kind of prop ragdolls are, I could possibly implement the fix itself with ragdolls too, but it'd be a little bit unreliable as the default behavior is to mourn where they died, and if the ragdoll flies off to who knows where there'll be no one to mourn xD
__________________

Last edited by DeathChaos25; 02-27-2015 at 12:20.
DeathChaos25 is offline
Sev
Veteran Member
Join Date: May 2010
Old 02-27-2015 , 12:35   Re: L4D2 - L4D1 Survivors mourn fix
Reply With Quote #8

Progress is progess as they say.

Good luck with it.

Also, nice touch on the Ellis mourn Zoey stuff.

Completely off topic.

There was a great exchange from the modified talker between Bill and Rochelle when Rochelle would pick Bill up. He would ask 'who are you' and Ro would go into one her elevator intros and Bill would insult her somehow. Always thought that was funny.

Last edited by Sev; 02-27-2015 at 12:43.
Sev is offline
Krufftys Killers
Senior Member
Join Date: Jan 2014
Old 02-27-2015 , 13:42   Re: L4D2 - L4D1 Survivors mourn fix
Reply With Quote #9

L 02/26/2015 - 20:186: SourceMod error session started
L 02/26/2015 - 20:186: Info (map "x1m1_cliffs") (file "errors_20150226.log")
L 02/26/2015 - 20:186: [SM] Native "GetEntPropVector" reported: Property "m_vecOrigin" not found (entity 452/logic_choreographed_scene)
L 02/26/2015 - 20:186: [SM] Displaying call stack trace for plugin "L4D2 Survivor Mourn Fix.smx":
L 02/26/2015 - 20:186: [SM] [0] Line 253, F:\L4D2DS\left4dead2\addons\sourcemod\scripti ng\L4D2 Survivor Mourn Fix.sp::TimerUpdate()
L 02/26/2015 - 20:187: [SM] Native "GetEntPropVector" reported: Property "m_vecOrigin" not found (entity 452/logic_choreographed_scene)
L 02/26/2015 - 20:187: [SM] Displaying call stack trace for plugin "L4D2 Survivor Mourn Fix.smx":
L 02/26/2015 - 20:187: [SM] [0] Line 253, F:\L4D2DS\left4dead2\addons\sourcemod\scripti ng\L4D2 Survivor Mourn Fix.sp::TimerUpdate()
L 02/26/2015 - 20:188: [SM] Native "GetEntPropVector" reported: Property "m_vecOrigin" not found (entity 452/logic_choreographed_scene)
L 02/26/2015 - 20:188: [SM] Displaying call stack trace for plugin "L4D2 Survivor Mourn Fix.smx":
L 02/26/2015 - 20:188: [SM] [0] Line 253, F:\L4D2DS\left4dead2\addons\sourcemod\scripti ng\L4D2 Survivor Mourn Fix.sp::TimerUpdate()
L 02/26/2015 - 20:189: [SM] Native "GetEntPropVector" reported: Property "m_vecOrigin" not found (entity 452/logic_choreographed_scene)
L 02/26/2015 - 20:189: [SM] Displaying call stack trace for plugin "L4D2 Survivor Mourn Fix.smx":
L 02/26/2015 - 20:189: [SM] [0] Line 253, F:\L4D2DS\left4dead2\addons\sourcemod\scripti ng\L4D2 Survivor Mourn Fix.sp::TimerUpdate()
L 02/26/2015 - 20:18:40: [SM] Native "GetEntPropVector" reported: Property "m_vecOrigin" not found (entity 452/logic_choreographed_scene)
L 02/26/2015 - 20:18:40: [SM] Displaying call stack trace for plugin "L4D2 Survivor Mourn Fix.smx":
L 02/26/2015 - 20:18:40: [SM] [0] Line 253, F:\L4D2DS\left4dead2\addons\sourcemod\scripti ng\L4D2 Survivor Mourn Fix.sp::TimerUpdate()
L 02/26/2015 - 20:18:41: [SM] Native "GetEntPropVector" reported: Property "m_vecOrigin" not found (entity 452/logic_choreographed_scene)
L 02/26/2015 - 20:18:41: [SM] Displaying call stack trace for plugin "L4D2 Survivor Mourn Fix.smx":
L 02/26/2015 - 20:18:41: [SM] [0] Line 253, F:\L4D2DS\left4dead2\addons\sourcemod\scripti ng\L4D2 Survivor Mourn Fix.sp::TimerUpdate()
L 02/26/2015 - 20:24:11: Error log file session closed.
Krufftys Killers is offline
DeathChaos25
Senior Member
Join Date: Jan 2014
Location: Puerto Rico
Old 02-27-2015 , 18:44   Re: L4D2 - L4D1 Survivors mourn fix
Reply With Quote #10

Quote:
Originally Posted by Krufftys Killers View Post
L 02/26/2015 - 20:186: SourceMod error session started
L 02/26/2015 - 20:186: Info (map "x1m1_cliffs") (file "errors_20150226.log")
L 02/26/2015 - 20:186: [SM] Native "GetEntPropVector" reported: Property "m_vecOrigin" not found (entity 452/logic_choreographed_scene)
L 02/26/2015 - 20:186: [SM] Displaying call stack trace for plugin "L4D2 Survivor Mourn Fix.smx":
L 02/26/2015 - 20:186: [SM] [0] Line 253, F:\L4D2DS\left4dead2\addons\sourcemod\scripti ng\L4D2 Survivor Mourn Fix.sp::TimerUpdate()
L 02/26/2015 - 20:187: [SM] Native "GetEntPropVector" reported: Property "m_vecOrigin" not found (entity 452/logic_choreographed_scene)
L 02/26/2015 - 20:187: [SM] Displaying call stack trace for plugin "L4D2 Survivor Mourn Fix.smx":
L 02/26/2015 - 20:187: [SM] [0] Line 253, F:\L4D2DS\left4dead2\addons\sourcemod\scripti ng\L4D2 Survivor Mourn Fix.sp::TimerUpdate()
L 02/26/2015 - 20:188: [SM] Native "GetEntPropVector" reported: Property "m_vecOrigin" not found (entity 452/logic_choreographed_scene)
L 02/26/2015 - 20:188: [SM] Displaying call stack trace for plugin "L4D2 Survivor Mourn Fix.smx":
L 02/26/2015 - 20:188: [SM] [0] Line 253, F:\L4D2DS\left4dead2\addons\sourcemod\scripti ng\L4D2 Survivor Mourn Fix.sp::TimerUpdate()
L 02/26/2015 - 20:189: [SM] Native "GetEntPropVector" reported: Property "m_vecOrigin" not found (entity 452/logic_choreographed_scene)
L 02/26/2015 - 20:189: [SM] Displaying call stack trace for plugin "L4D2 Survivor Mourn Fix.smx":
L 02/26/2015 - 20:189: [SM] [0] Line 253, F:\L4D2DS\left4dead2\addons\sourcemod\scripti ng\L4D2 Survivor Mourn Fix.sp::TimerUpdate()
L 02/26/2015 - 20:18:40: [SM] Native "GetEntPropVector" reported: Property "m_vecOrigin" not found (entity 452/logic_choreographed_scene)
L 02/26/2015 - 20:18:40: [SM] Displaying call stack trace for plugin "L4D2 Survivor Mourn Fix.smx":
L 02/26/2015 - 20:18:40: [SM] [0] Line 253, F:\L4D2DS\left4dead2\addons\sourcemod\scripti ng\L4D2 Survivor Mourn Fix.sp::TimerUpdate()
L 02/26/2015 - 20:18:41: [SM] Native "GetEntPropVector" reported: Property "m_vecOrigin" not found (entity 452/logic_choreographed_scene)
L 02/26/2015 - 20:18:41: [SM] Displaying call stack trace for plugin "L4D2 Survivor Mourn Fix.smx":
L 02/26/2015 - 20:18:41: [SM] [0] Line 253, F:\L4D2DS\left4dead2\addons\sourcemod\scripti ng\L4D2 Survivor Mourn Fix.sp::TimerUpdate()
L 02/26/2015 - 20:24:11: Error log file session closed.
Hmm, this is weird, there should be no possible reason for this to error out like that, did the map have pre-existing death models? Or did someone die in a weird way?

I haven't had any errors from this plugin in my logs, and the error itself is harmless, but I'll investigate the issue and try to fix it for the next version which should come (hopefully) soon.

Have you had any more errors since then? It seems to be specific to this custom campaign map that was being played.
__________________
DeathChaos25 is offline
Reply



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 14:18.


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