AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D/L4D2] Survivor Character Fixes | 0.2 : Soon (https://forums.alliedmods.net/showthread.php?t=336328)

cravenge 02-12-2022 10:46

[L4D/L4D2] Survivor Character Fixes | 0.2 : Soon
 
3 Attachment(s)
About:
Recommended for servers that have survivor character changing plug-ins (e.g. Character Select Menu, Survivor Chat Select and Character Manager)
Apparently, playing as L4D1 survivors along the L4D2 crew looks fine in plain sight. But behind the scenes, something dangerous is happening.

Keep in mind that there are these "member variables" under classes and structs within the game and most of said member variables, which are related to survivor characters, are multidimensional arrays and can only hold up to 4 indexes max per dimension.

So what happens is this: once Bill, Zoey, Francis and/or Louis is/are added into the gameplay, stuff goes haywire and since the member variables I mentioned can only account for 4 survivor characters (mainly 0 to 3 or Nick to Ellis), it's more likely that the next member variable or variables will be overwritten and it's because of the L4D1 survivors' character indexes being higher than 3.

For those who have noticed, a recent update was released for L4D2 which finally stopped Zoey from crashing on Windows. It may seem like there's nothing else to worry about from that point on but that's wrong.

ConVars:
  • survivor_character_fixes_version
    → Version of this plug-in


Requirements:
✧ SourceMod 1.11+
✧ My fork of the Source Scramble extension

Thanks:
🎮 EdisonGar, Rise and Cuba - For helping me test

Related Plug-ins:
[L4D/L4D2] Dialogue Criteria Fixes

Changelog:
Code:

0.1 (02/12/22)
* First release


Sev 02-12-2022 14:33

Re: [L4D/L4D2] Survivor Character Fixes | 0.1 : February 12, 2022 |
 
L 02/12/2022 - 14:30:42: [SM] Blaming: survivor_character_fixes.smx
L 02/12/2022 - 14:30:42: [SM] Call stack trace:
L 02/12/2022 - 14:30:42: [SM] [0] DHookReturn.Value.set
L 02/12/2022 - 14:30:42: [SM] [1] Line 178, C:\Users\Acer\Desktop\crap\Shared Plugins\survivor_character_fixes.sp::dtrPlaye rByIndex_Pre
L 02/12/2022 - 14:30:42: [SM] Exception reported: Invalid entity index passed for return value
L 02/12/2022 - 14:30:42: [SM] Blaming: survivor_character_fixes.smx
L 02/12/2022 - 14:30:42: [SM] Call stack trace:
L 02/12/2022 - 14:30:42: [SM] [0] DHookReturn.Value.set
L 02/12/2022 - 14:30:42: [SM] [1] Line 178, C:\Users\Acer\Desktop\crap\Shared Plugins\survivor_character_fixes.sp::dtrPlaye rByIndex_Pre
L 02/12/2022 - 14:30:42: [SM] Exception reported: Invalid entity index passed for return value
L 02/12/2022 - 14:30:42: [SM] Blaming: survivor_character_fixes.smx
L 02/12/2022 - 14:30:42: [SM] Call stack trace:
L 02/12/2022 - 14:30:42: [SM] [0] DHookReturn.Value.set
L 02/12/2022 - 14:30:42: [SM] [1] Line 178, C:\Users\Acer\Desktop\crap\Shared Plugins\survivor_character_fixes.sp::dtrPlaye rByIndex_Pre

cravenge 02-12-2022 14:45

Re: [L4D/L4D2] Survivor Character Fixes | 0.1 : February 12, 2022 |
 
Quote:

Originally Posted by Sev (Post 2771281)
L 02/12/2022 - 14:30:42: [SM] Blaming: survivor_character_fixes.smx
L 02/12/2022 - 14:30:42: [SM] Call stack trace:
L 02/12/2022 - 14:30:42: [SM] [0] DHookReturn.Value.set
L 02/12/2022 - 14:30:42: [SM] [1] Line 178, C:\Users\Acer\Desktop\crap\Shared Plugins\survivor_character_fixes.sp::dtrPlaye rByIndex_Pre
L 02/12/2022 - 14:30:42: [SM] Exception reported: Invalid entity index passed for return value
L 02/12/2022 - 14:30:42: [SM] Blaming: survivor_character_fixes.smx
L 02/12/2022 - 14:30:42: [SM] Call stack trace:
L 02/12/2022 - 14:30:42: [SM] [0] DHookReturn.Value.set
L 02/12/2022 - 14:30:42: [SM] [1] Line 178, C:\Users\Acer\Desktop\crap\Shared Plugins\survivor_character_fixes.sp::dtrPlaye rByIndex_Pre
L 02/12/2022 - 14:30:42: [SM] Exception reported: Invalid entity index passed for return value
L 02/12/2022 - 14:30:42: [SM] Blaming: survivor_character_fixes.smx
L 02/12/2022 - 14:30:42: [SM] Call stack trace:
L 02/12/2022 - 14:30:42: [SM] [0] DHookReturn.Value.set
L 02/12/2022 - 14:30:42: [SM] [1] Line 178, C:\Users\Acer\Desktop\crap\Shared Plugins\survivor_character_fixes.sp::dtrPlaye rByIndex_Pre

Update to the latest version of DHooks.

Toranks 02-12-2022 23:25

Re: [L4D/L4D2] Survivor Character Fixes | 0.1 : February 12, 2022 |
 
L 02/13/2022 - 05:22:21: SourceMod error session started
L 02/13/2022 - 05:22:21: Info (map "c1m2_streets") (file "D:\Left 4 Dead 2\left4dead2\addons\sourcemod\logs\errors_202 20213.log")
L 02/13/2022 - 05:22:21: [SM] Exception reported: Signature for "ConvertToExternalCharacter" is broken!
L 02/13/2022 - 05:22:21: [SM] Blaming: survivor_character_fixes.smx
L 02/13/2022 - 05:22:21: [SM] Call stack trace:
L 02/13/2022 - 05:22:21: [SM] [0] SetFailState
L 02/13/2022 - 05:22:21: [SM] [1] Line 66, D:\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\survi vor_character_fixes.sp::OnPluginStart
L 02/13/2022 - 05:22:21: [SM] Unable to load plugin "survivor_character_fixes.smx": Error detected in plugin startup (see error logs)

cravenge 02-13-2022 04:13

Re: [L4D/L4D2] Survivor Character Fixes | 0.1 : February 12, 2022 |
 
Quote:

Originally Posted by Toranks (Post 2771324)
L 02/13/2022 - 05:22:21: SourceMod error session started
L 02/13/2022 - 05:22:21: Info (map "c1m2_streets") (file "D:\Left 4 Dead 2\left4dead2\addons\sourcemod\logs\errors_202 20213.log")
L 02/13/2022 - 05:22:21: [SM] Exception reported: Signature for "ConvertToExternalCharacter" is broken!
L 02/13/2022 - 05:22:21: [SM] Blaming: survivor_character_fixes.smx
L 02/13/2022 - 05:22:21: [SM] Call stack trace:
L 02/13/2022 - 05:22:21: [SM] [0] SetFailState
L 02/13/2022 - 05:22:21: [SM] [1] Line 66, D:\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\survi vor_character_fixes.sp::OnPluginStart
L 02/13/2022 - 05:22:21: [SM] Unable to load plugin "survivor_character_fixes.smx": Error detected in plugin startup (see error logs)

Was there any recent update that I didn't notice? I'm asking cuz it's fine on my end.

HarryPotter 02-13-2022 05:43

Re: [L4D/L4D2] Survivor Character Fixes | 0.1 : February 12, 2022 |
 
Sorry I am so dumb, still not understand what this plugin actually fixes.

If I install this plugin, should I remove Real Zoey Unlock and Ladder Server Crash - Patch Fix ?

cravenge 02-13-2022 06:21

Re: [L4D/L4D2] Survivor Character Fixes | 0.1 : February 12, 2022 |
 
Quote:

Originally Posted by HarryPotter (Post 2771342)
Sorry I am so dumb, still not understand what this plugin actually fixes.

If I install this plugin, should I remove Real Zoey Unlock and Ladder Server Crash - Patch Fix ?

I'll try to be more clear in the next update. To answer your question, you can safely remove Real Zoey Unlock. For Ladder Server Crash, you can still keep it in case crashes related to CNavLadder still occur even with this installed.

Shao 02-13-2022 13:32

Re: [L4D/L4D2] Survivor Character Fixes | 0.1 : February 12, 2022 |
 
So if I am to have mission files always set to survivor_set "2" no matter what, will this bug still occur? Or does it not happen based on those.

cravenge 02-13-2022 16:08

Re: [L4D/L4D2] Survivor Character Fixes | 0.1 : February 12, 2022 |
 
Quote:

Originally Posted by Shao (Post 2771389)
So if I am to have mission files always set to survivor_set "2" no matter what, will this bug still occur? Or does it not happen based on those.

No, it has nothing to do with which survivor set a map uses but rather the value of "m_survivorCharacter" being negative or higher than 3.

Toranks 02-14-2022 03:19

Re: [L4D/L4D2] Survivor Character Fixes | 0.1 : February 12, 2022 |
 
Quote:

Originally Posted by cravenge (Post 2771335)
Was there any recent update that I didn't notice? I'm asking cuz it's fine on my end.

Maybe it's incompatible with 1.11, latest stable is 1.10, but I've 60 mods and all of them works ok...

Quote:

SourceMod Version Information:
SourceMod Version: 1.11.0.6826
SourcePawn Engine: 1.11.0.6826, jit-x86 (build 1.11.0.6826)
SourcePawn API: v1 = 5, v2 = 16
Compiled on: Nov 30 2021 08:26:34
Built from: https://github.com/alliedmodders/sou...ommit/329d5872
Build ID: 6826:329d5872
http://www.sourcemod.net/


All times are GMT -4. The time now is 07:36.

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