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

[L4D & L4D2] Left 4 DHooks Direct (1.146) [21-Apr-2024]


Post New Thread Reply   
 
Thread Tools Display Modes
kevinracer
Member
Join Date: Dec 2009
Old 09-02-2021 , 11:24   Re: [L4D & L4D2] Left 4 DHooks Direct (1.52) [31-Aug-2021]
Reply With Quote #431

Quote:
Originally Posted by Silvers View Post
It's not a command it's a cvar so do: "sm_cvar l4d_unreserve_full 1" - you could save that to your server.cfg or listenserver.cfg depending on the type of server you have.
Ya i added but still need l4dunreservelobby.smx in folder plugins.
kevinracer is offline
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 09-04-2021 , 22:08   Re: [L4D & L4D2] Left 4 DHooks Direct (1.52) [31-Aug-2021]
Reply With Quote #432

PHP Code:
// A versus round is started when survivors leave the safe room, or force started after 90 seconds regardless
forward Action L4D_OnFirstSurvivorLeftSafeArea(int client); 
L4D1 windows server, Plugin_Handled is not working.
I use Plugin_Handled and return players back to safe area, but survivors can not trigger this function second time.

PHP Code:
// Is used for displaying the "X gets Tank" window and transferring Tank control
forward Action L4D_OnTryOfferingTankBot(int tank_indexbool &enterStasis); 
this function is not working first time director tank spawns in l4d1 linux.

PHP Code:
// Called when a Witch spawns
forward Action L4D_OnSpawnWitch(const float vecPos[3], const float vecAng[3]); 
this function is not working in l4d1 linux.

PHP Code:
// L4D2 only. The campaign scores are not set until the end of round 2, use L4D_GetCampaignScores to get them earlier.
native int L4D_GetTeamScore(int logical_teambool campaign_score=false); 
this function can work in l4d1, don't know why not also PrepSDKCall_SetFromConf(hGameData, SDKConf_Signature, "GetTeamScore") in l4d1
__________________

Last edited by HarryPotter; 09-06-2021 at 10:46.
HarryPotter is offline
Shadow Mirror
Junior Member
Join Date: Mar 2016
Old 09-06-2021 , 00:21   Re: [L4D & L4D2] Left 4 DHooks Direct (1.52) [31-Aug-2021]
Reply With Quote #433

Hi, after checking cache integrity I'm having the following log problems:
L 09/05/2021 - 23:42:42: SourceMod error session started
L 09/05/2021 - 23:42:42: Info (map "c11m1_greenhouse") (file "C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\logs\errors_202 10905.log")
L 09/05/2021 - 23:42:42: [left4dhooks.smx] Failed to find signature: ForceNextStage
L 09/05/2021 - 23:42:42: [left4dhooks.smx] Failed to find signature: CancelStagger
L 09/05/2021 - 23:42:42: [left4dhooks.smx] Failed to find signature: RegisterForbiddenTarget
L 09/05/2021 - 23:42:42: [left4dhooks.smx] Failed to find signature: UnRegisterForbiddenTarget
L 09/05/2021 - 23:42:42: [left4dhooks.smx] Failed to load "UseHealingItems" signature.
L 09/05/2021 - 23:47:01: Error log file session closed.

How can i fix it
Shadow Mirror is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 09-06-2021 , 13:54   Re: [L4D & L4D2] Left 4 DHooks Direct (1.52) [31-Aug-2021]
Reply With Quote #434

Quote:
Originally Posted by Shadow Mirror View Post
Hi, after checking cache integrity I'm having the following log problems:
L 09/05/2021 - 23:42:42: SourceMod error session started
L 09/05/2021 - 23:42:42: Info (map "c11m1_greenhouse") (file "C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\logs\errors_202 10905.log")
L 09/05/2021 - 23:42:42: [left4dhooks.smx] Failed to find signature: ForceNextStage
L 09/05/2021 - 23:42:42: [left4dhooks.smx] Failed to find signature: CancelStagger
L 09/05/2021 - 23:42:42: [left4dhooks.smx] Failed to find signature: RegisterForbiddenTarget
L 09/05/2021 - 23:42:42: [left4dhooks.smx] Failed to find signature: UnRegisterForbiddenTarget
L 09/05/2021 - 23:42:42: [left4dhooks.smx] Failed to load "UseHealingItems" signature.
L 09/05/2021 - 23:47:01: Error log file session closed.

How can i fix it
Update the gamedata file, and maybe the plugin too.
__________________
Silvers is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 09-06-2021 , 14:01   Re: [L4D & L4D2] Left 4 DHooks Direct (1.52) [31-Aug-2021]
Reply With Quote #435

Quote:
Originally Posted by HarryPotter View Post
PHP Code:
// A versus round is started when survivors leave the safe room, or force started after 90 seconds regardless
forward Action L4D_OnFirstSurvivorLeftSafeArea(int client); 
L4D1 windows server, Plugin_Handled is not working.
I use Plugin_Handled and return players back to safe area, but survivors can not trigger this function second time.
I guess it breaks too much when blocking, nothing I can do to fix that function.

Quote:
Originally Posted by HarryPotter View Post
PHP Code:
// Is used for displaying the "X gets Tank" window and transferring Tank control
forward Action L4D_OnTryOfferingTankBot(int tank_indexbool &enterStasis); 
this function is not working first time director tank spawns in l4d1 linux.
Seems like that's something with the game logic not triggering the function, nothing can be done. This is something triggered in Versus when the a player tank is losing control.


Quote:
Originally Posted by HarryPotter View Post
PHP Code:
// Called when a Witch spawns
forward Action L4D_OnSpawnWitch(const float vecPos[3], const float vecAng[3]); 
this function is not working in l4d1 linux.
I can checck if the gamedata is using the wrong signature which maybe the reason it's not triggering.

Quote:
Originally Posted by HarryPotter View Post
PHP Code:
// L4D2 only. The campaign scores are not set until the end of round 2, use L4D_GetCampaignScores to get them earlier.
native int L4D_GetTeamScore(int logical_teambool campaign_score=false); 
this function can work in l4d1, don't know why not also PrepSDKCall_SetFromConf(hGameData, SDKConf_Signature, "GetTeamScore") in l4d1
Have you verified it works? I can open this up to L4D1 then.
__________________
Silvers is offline
Shadow Mirror
Junior Member
Join Date: Mar 2016
Old 09-06-2021 , 16:30   Re: [L4D & L4D2] Left 4 DHooks Direct (1.52) [31-Aug-2021]
Reply With Quote #436

Quote:
Originally Posted by Silvers View Post
Update the gamedata file, and maybe the plugin too.
Hi Silvers. How can I update the gamedata of this plugin? I'm new, what do I have to touch? ty pd:im using windows

Last edited by Shadow Mirror; 09-06-2021 at 16:32.
Shadow Mirror is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 09-06-2021 , 16:56   Re: [L4D & L4D2] Left 4 DHooks Direct (1.52) [31-Aug-2021]
Reply With Quote #437

Just redownload the plugin and overwrite/replace the current install.
__________________

Last edited by Marttt; 09-06-2021 at 17:01.
Marttt is offline
Forgetest
Member
Join Date: Aug 2020
Old 09-07-2021 , 02:10   Re: [L4D & L4D2] Left 4 DHooks Direct (1.52) [31-Aug-2021]
Reply With Quote #438

Quote:
Originally Posted by HarryPotter View Post
PHP Code:
// A versus round is started when survivors leave the safe room, or force started after 90 seconds regardless
forward Action L4D_OnFirstSurvivorLeftSafeArea(int client); 
L4D1 windows server, Plugin_Handled is not working.
I use Plugin_Handled and return players back to safe area, but survivors can not trigger this function second time.
Investigated and found that in Director::Update a boolean is always set before Director::OnFirstSurvivorLeftSafeArea is called, which also decides whether director should keep checking survivors' positions.

Partial pseudocode:
PHP Code:
if ( !*((_BYTE *)this 356) || !*((_BYTE *)this 357) )
  {
    
v43 0;
    
v44 0;
    
v45 0;
    
v46 0;
    
v47 0;
    
ptr 0;
    
v49 0;
    
v50 0;
    
v51 0;
    
v52 0;
    *(
float *)&v41 0.0;
    
v42 0;
    
ForEachPlayer<SurvivorsInSafeArea>(&v41);
    if ( 
v42 )
    {
      if ( !*((
_BYTE *)this 356) )
      {
        *((
_BYTE *)this 356) = 1;
        
Director::OnFirstSurvivorLeftSafeArea(this, *(CTerrorPlayer **)ptr);
      }
      if ( *(
float *)&v41 == 0.0 && !*((_BYTE *)this 357) )
      {
        if ( (*((
_BYTE *)this 357) = 1, !*((_BYTE *)this 639)) && !Director::m_isTransitioning
          
|| Director::m_isScenarioRestart )
        {
          *((
_DWORD *)this 386) = *((_DWORD *)this 385);
          
ForEachSurvivor<DispatchPlayerMissionStarted>();
        }
      }
    } 
While in L4D2 the boolean check and assignment is completed inside Director::OnFirstSurvivorLeftSafeArea, therefore I think this is the reason why blocking the function results differently on both games.

Offsets for both Linux and Windows on L4D1, hope it would be helpful:
Code:
Director->m_bFirstSurvivorLeftStartArea
Linux: 356, Windows: 360

// additionally found
Director->m_bLastSurvivorLeftStartArea
Linux: 357, Windows: 361

Last edited by Forgetest; 09-07-2021 at 02:11.
Forgetest is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 09-07-2021 , 02:31   Re: [L4D & L4D2] Left 4 DHooks Direct (1.52) [31-Aug-2021]
Reply With Quote #439

Excellent thank you! Will add patching and see if that fixes it. Do you think m_bLastSurvivorLeftStartArea should also be patched?

Edit: Yeah doing this fixes it, thanks so much!

PHP Code:
StoreToAddress(g_pDirector view_as<Address>(m_bFirstSurvivorLeftStartArea), 0NumberType_Int8); 
__________________

Last edited by Silvers; 09-07-2021 at 02:39.
Silvers is offline
Forgetest
Member
Join Date: Aug 2020
Old 09-07-2021 , 03:06   Re: [L4D & L4D2] Left 4 DHooks Direct (1.52) [31-Aug-2021]
Reply With Quote #440

Quote:
Originally Posted by Silvers View Post
Excellent thank you! Will add patching and see if that fixes it. Do you think m_bLastSurvivorLeftStartArea should also be patched?

Edit: Yeah doing this fixes it, thanks so much!

PHP Code:
StoreToAddress(g_pDirector view_as<Address>(m_bFirstSurvivorLeftStartArea), 0NumberType_Int8); 
Cheers.
Director::Update does checks like below:
PHP Code:
if (!Director->m_bFirstSurvivorLeftStartArea || !Director->m_bLastSurvivorLeftStartArea
So it's probably not needed to patch m_bLastSurvivorLeftStartArea, unless you'd like to add OnLastSurvivorLeftStartArea into hooks, and there's something alike there.
Forgetest 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 00:07.


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