Raised This Month: $7 Target: $400
 1% 

[L4D2] Survivor Set Flow Fix (August 30th, 2023)


Post New Thread Reply   
 
Thread Tools Display Modes
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 09-28-2022 , 22:30   Re: [L4D2] Trigger Flow Fix
Reply With Quote #11

Quote:
Originally Posted by Slaven555 View Post
I have rebuilt models on the server and my own plugin to select them. On the map "Death Toll" I start the radio, while I have a custom model (based on the l4d2 set). The radio continues to speak after the ending trigger is triggered.
Alternatively, you can add response rules in the talker files of the survivors usually inaccessible in campaigns they aren't meant to spawn in in order to stop that issue.

Last edited by cravenge; 09-28-2022 at 22:31.
cravenge is offline
gabuch2
AlliedModders Donor
Join Date: Mar 2011
Location: Chile
Old 09-30-2022 , 18:46   Re: [L4D2] Trigger Flow Fix
Reply With Quote #12

Quote:
Originally Posted by Slaven555 View Post
I have rebuilt models on the server and my own plugin to select them. On the map "Death Toll" I start the radio, while I have a custom model (based on the l4d2 set). The radio continues to speak after the ending trigger is triggered.
Thanks to Silvers and the new version of Left 4 DHooks Direct it is now possible to fix this.



A new version including this fix will be released soon.
__________________

Last edited by gabuch2; 09-30-2022 at 18:47.
gabuch2 is offline
gabuch2
AlliedModders Donor
Join Date: Mar 2011
Location: Chile
Old 10-02-2022 , 21:23   Re: [L4D2] Survivor Set Flow Fix
Reply With Quote #13

  • 2.0
    • The plugin now fully fixes the oddities with func_orator (Most official maps)
    • Plugin renamed to Survivor Set Flow Fix (from Trigger Flow Flix) to better represent the original problem the plugin aims to fix. The plugin filename is kept the same for legacy purposes.

Please test.
__________________

Last edited by gabuch2; 10-02-2022 at 21:23.
gabuch2 is offline
Slaven555
Member
Join Date: Jul 2018
Old 10-03-2022 , 03:59   Re: [L4D2] Survivor Set Flow Fix
Reply With Quote #14

Quote:
Originally Posted by gabuch2 View Post
  • 2.0
    • The plugin now fully fixes the oddities with func_orator (Most official maps)
    • Plugin renamed to Survivor Set Flow Fix (from Trigger Flow Flix) to better represent the original problem the plugin aims to fix. The plugin filename is kept the same for legacy purposes.

Please test.

Great job. I looked at the last few cards. The fix is fully working.
Thank you very much for a great plugin!!!
Slaven555 is offline
yabi
Senior Member
Join Date: Jun 2021
Location: Taiwan
Old 07-11-2023 , 00:17   Re: [L4D2] Survivor Set Flow Fix
Reply With Quote #15

L 07/11/2023 - 12:14:43: SourceMod error session started
L 07/11/2023 - 12:14:43: Info (map "c2m1_highway") (file "C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\logs\error s_20230711.log")
L 07/11/2023 - 12:14:43: [SM] Exception reported:
==========
Native 'L4D2_GetSurvivorSetMap' should not be used before OnMapStart, please report to 3rd party plugin author.
==========
L 07/11/2023 - 12:14:43: [SM] Blaming: left4dhooks.smx
L 07/11/2023 - 12:14:43: [SM] Call stack trace:
L 07/11/2023 - 12:14:43: [SM] [0] ThrowNativeError
L 07/11/2023 - 12:14:43: [SM] [1] Line 747, l4dd\l4dd_natives.sp::Native_CTerrorGameRules _GetSurvivorSetMap
L 07/11/2023 - 12:14:43: [SM] [3] L4D2_GetSurvivorSetMap
L 07/11/2023 - 12:14:43: [SM] [4] Line 55, C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\ l4d2_trigger_flow_fix.sp::OnMapStart
yabi is offline
Krufftys Killers
Senior Member
Join Date: Jan 2014
Old 07-24-2023 , 21:37   Re: [L4D2] Survivor Set Flow Fix
Reply With Quote #16

Old Today , 08:15 PM Re: [L4D & L4D2] Left 4 DHooks Direct (1.134) [10-Jul-2023]
Edit/Delete Message Reply With Quote Multi-Quote This Message Quick reply to this message #944
Gott his error today
L 07/24/2023 - 065:00: SourceMod error session started
L 07/24/2023 - 065:00: Info (map "c1m1_hotel") (file "d:\tcafiles\users\stevef\63359\left4dead 2\ad dons\sourcemod\logs\errors_20230724.log")
L 07/24/2023 - 065:00: [SM] Exception reported:
==========
Native 'L4D2_GetSurvivorSetMap' should not be used before OnMapStart, please report to 3rd party plugin author.
==========
L 07/24/2023 - 065:00: [SM] Blaming: left4dhooks.smx
L 07/24/2023 - 065:00: [SM] Call stack trace:
L 07/24/2023 - 065:00: [SM] [0] ThrowNativeError
L 07/24/2023 - 065:00: [SM] [1] Line 747, l4dd\l4dd_natives.sp::Native_CTerrorGameRules _GetSurvivorSetMap
L 07/24/2023 - 065:00: [SM] [3] L4D2_GetSurvivorSetMap
L 07/24/2023 - 065:00: [SM] [4] Line 55, C:\Users\kruff\Downloads\l4d2_trigger_flow_fi x.sp::OnMapStart
L 07/24/2023 - 06:46:43: SourceMod error session started
L 07/24/2023 - 06:46:43: Info (map "c1m1_hotel") (file "d:\tcafiles\users\stevef\63359\left4dead 2\ad dons\sourcemod\logs\errors_20230724.log")
L 07/24/2023 - 06:46:43: [SM] Exception reported:
Krufftys Killers is offline
Hawkins
Senior Member
Join Date: Jul 2021
Old 07-25-2023 , 06:27   Re: [L4D2] Survivor Set Flow Fix
Reply With Quote #17

Quote:
Originally Posted by yabi View Post
Native 'L4D2_GetSurvivorSetMap' should not be used before OnMapStart, please report to 3rd party plugin author.
Just replace
PHP Code:
public void OnMapStart()
{
    
g_bIsL4D1 L4D2_GetSurvivorSetMap() == false true;

with

PHP Code:
public void OnMapStart()
{
    
RequestFrame(NextFrame);
}

void NextFrame()
{
    
g_bIsL4D1 L4D2_GetSurvivorSetMap() == false true;

Or if you want to get absolutely sure this func won't be called too early:

PHP Code:
public void OnMapStart()
{
    
CreateTimer(0.1Timer_GetSurvivorSetMap);
}

Action Timer_GetSurvivorSetMap(Handle timer)
{
    
g_bIsL4D1 L4D2_GetSurvivorSetMap() == false true;
    return 
Plugin_Continue;

Hawkins is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 07-25-2023 , 18:34   Re: [L4D2] Survivor Set Flow Fix
Reply With Quote #18

Quote:
Originally Posted by Hawkins View Post
Or if you want to get absolutely sure this func won't be called too early:
RequestFrame is fine, no need for timer.




Another method to support various versions of left4dhooks and to also retrieve the value as early as possible (could be as early as OnMapStart as long as the plugin loads after left4dhooks):

PHP Code:
public void OnMapStart()
{
    if( 
GetFeatureStatus(FeatureType_Native"Left4DHooks_Version") != FeatureStatus_Available || Left4DHooks_Version() < 1135 || !L4D_HasMapStarted() )
    {
        
RequestFrame(OnFrameStart);
    }
    else
    {
        
OnFrameStart();
    }
}

void OnFrameStart()
{
    
g_bIsL4D1 L4D2_GetSurvivorSetMap() == false true;


This is using the native L4D_HasMapStarted which I haven't added to Left4DHooks yet but that's planned for the next version.

Basically depending on plugin load order, OnMapStart might fire before or after Left4DHooks, if it's after then everything should be fine, but before would cause problems as some natives are not ready to be called by then. So using RequestFrame would fix the issue, but this way you could call the native either in OnMapStart or 1 frame later if it's not ready yet. I don't know when I'll release the update with L4D_HasMapStarted() so this is just to show you how it should be implemented down the line
__________________
Silvers is offline
gabuch2
AlliedModders Donor
Join Date: Mar 2011
Location: Chile
Old 08-30-2023 , 00:13   Re: [L4D2] Survivor Set Flow Fix (August 30th, 2023)
Reply With Quote #19

2.0.1
  • Fixed the plugin not working if, for some reason, it loads after Left 4 DHooks Direct. Thanks Silvers for the fix.
    • Upgrading from an older version requires Left 4 DHooks Direct 1.135 or newer.
__________________
gabuch2 is offline
S.A.S
Member
Join Date: Jul 2023
Old 09-12-2023 , 11:05   Re: [L4D2] Survivor Set Flow Fix (August 30th, 2023)
Reply With Quote #20

Quote:
Originally Posted by gabuch2 View Post
2.0.1
  • Fixed the plugin not working if, for some reason, it loads after Left 4 DHooks Direct. Thanks Silvers for the fix.
    • Upgrading from an older version requires Left 4 DHooks Direct 1.135 or newer.
Code:
L 09/11/2023 - 15:45:22: SourceMod error session started
L 09/11/2023 - 15:45:22: Info (map "c10m1_caves") (file "/left4dead2/addons/sourcemod/logs/errors_20230911.log")
L 09/11/2023 - 15:45:22: [SM] Exception reported: CTerrorGameRules::GetMissionInfo not available (NIX/2/1.136).
L 09/11/2023 - 15:45:22: [SM] Blaming: left4dhooks.smx
L 09/11/2023 - 15:45:22: [SM] Call stack trace:
L 09/11/2023 - 15:45:22: [SM]   [0] ThrowNativeError
L 09/11/2023 - 15:45:22: [SM]   [1] Line 186, l4dd\l4dd_natives.sp::ValidateAddress
L 09/11/2023 - 15:45:22: [SM]   [2] Line 763, l4dd\l4dd_natives.sp::Native_CTerrorGameRules_GetSurvivorSetMap
L 09/11/2023 - 15:45:22: [SM]   [4] L4D2_GetSurvivorSetMap
L 09/11/2023 - 15:45:22: [SM]   [5] Line 70, \scripting\l4d2_trigger_flow_fix.sp::OnFrameStart
L 09/11/2023 - 16:00:06: Error log file session closed.
L 09/11/2023 - 22:24:38: SourceMod error session started
L 09/11/2023 - 22:24:38: Info (map "c10m1_caves") (file "/left4dead2/addons/sourcemod/logs/errors_20230911.log")
L 09/11/2023 - 22:24:38: [SM] Exception reported: CTerrorGameRules::GetMissionInfo not available (NIX/2/1.136).
L 09/11/2023 - 22:24:38: [SM] Blaming: left4dhooks.smx
L 09/11/2023 - 22:24:38: [SM] Call stack trace:
L 09/11/2023 - 22:24:38: [SM]   [0] ThrowNativeError
L 09/11/2023 - 22:24:38: [SM]   [1] Line 186, l4dd\l4dd_natives.sp::ValidateAddress
L 09/11/2023 - 22:24:38: [SM]   [2] Line 763, l4dd\l4dd_natives.sp::Native_CTerrorGameRules_GetSurvivorSetMap
L 09/11/2023 - 22:24:38: [SM]   [4] L4D2_GetSurvivorSetMap
L 09/11/2023 - 22:24:38: [SM]   [5] Line 70, \scripting\l4d2_trigger_flow_fix.sp::OnFrameStart
L 09/11/2023 - 22:45:16: Error log file session closed.

Last edited by S.A.S; 09-12-2023 at 11:06.
S.A.S 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 06:10.


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