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
Shao
Senior Member
Join Date: Jan 2015
Old 03-13-2020 , 09:52   Re: [L4D & L4D2] Left 4 DHooks Direct (1.9) [10-Mar-2020]
Reply With Quote #61

Would you happen to have time taking a look to srsmod compile? There's a verification process that prevents left4dhooks from being the new #include and boy I have no idea how to get around it, trying to get rid of anything is a cascade of errors.

Although unlike srsmod, Pounce Kinetics worked like a charm, so I will keep in mind the process for left4dhooks if I ever happen to need it because I can't really go out and play without srsmod as of yet, but I really wish I could have the more recent stuff.
Shao is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 03-13-2020 , 11:28   Re: [L4D & L4D2] Left 4 DHooks Direct (1.9) [10-Mar-2020]
Reply With Quote #62

Quote:
Originally Posted by Shao View Post
Would you happen to have time taking a look to srsmod compile? There's a verification process that prevents left4dhooks from being the new #include and boy I have no idea how to get around it, trying to get rid of anything is a cascade of errors.

Although unlike srsmod, Pounce Kinetics worked like a charm, so I will keep in mind the process for left4dhooks if I ever happen to need it because I can't really go out and play without srsmod as of yet, but I really wish I could have the more recent stuff.
  1. srs.main.sp: Replace "#include <left4downtown>" with "#include <left4dhooks>"
  2. versioning.sp: Replace "defined _l4do_included" with "defined _l4dh_included"
  3. srs.scoringsystem.sp: Remove "static L4D2_AreTeamsFlipped" and the next 3 lines.
  4. debug.sp: Replace "in" (exact word match) with "inn" because it's now a reserved keyword.
  5. versioning.sp: Replace "throw" (exact word match) with "throww" because it's now a reserved keyword.





Edit: updated
Code:
1.10 (14-Mar-2020)
    - Added natives (L4D1 & L4D2): "L4D_IsAnySurvivorInStartArea", "L4D_IsInFirstCheckpoint" and "L4D_IsInLastCheckpoint".
    - Added native (L4D2 only): "L4D2_GetCurrentFinaleStage".
    - Thanks to "Nuki" for requesting.

    - Fixed missing "L4D2IWA_ClipSize" offset. Now this works: L4D2_SetIntWeaponAttribute("weapon_rifle", L4D2IWA_ClipSize, 100);
    - See include for details.

    - Updated: Test plugin to reflect above changes.
    - Updated: Plugin, Include and GameData files.
__________________

Last edited by Silvers; 03-13-2020 at 21:01.
Silvers is offline
Shao
Senior Member
Join Date: Jan 2015
Old 03-14-2020 , 00:20   Re: [L4D & L4D2] Left 4 DHooks Direct (1.10) [14-Mar-2020]
Reply With Quote #63

Great work, you're a savior! Although, should the warnings be of concern in the future with;

srs.itemremoval.sp(113) : warning 241: Array-based enum structs will be removed in 1.11. See https://wiki.alliedmods.net/SourcePa...x#Enum_Structs
srs.scoringsystem.sp(117) : warning 241: Array-based enum structs will be removed in 1.11. See https://wiki.alliedmods.net/SourcePa...x#Enum_Structs

Think it could cause any bad issues? Or should be ignored.
Shao is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 03-14-2020 , 01:34   Re: [L4D & L4D2] Left 4 DHooks Direct (1.10) [14-Mar-2020]
Reply With Quote #64

Well when 1.11 becomes latest stable version SrsMod would need an update to fix. The whole thing is old syntax too so maybe someone can modernize it. Not a task I'll take on myself, I see several people updating various plugins over the last year or so. Array-based enum I've not really looked at because I don't use them, might not be so easy to fix without lots of re-writing but I don't know.

For now it can be ignored because 1.10 still supports that structure.




Code:
1.11 (18-Mar-2020)
    - Added command "sm_l4dhooks_detours" to display which forwards are enabled.
    - Added missing natives: "L4D2Direct_GetPendingMobCount" and "L4D2Direct_SetPendingMobCount" from "raziEiL"'s port.
    - Fixed native "L4D2_GetVScriptOutput" using the provided buffer to execute code. Buffer now can be small to get small return values.
    - Optimized native "L4D2_GetVScriptOutput" to reuse the same entity for multiple calls in the same frame.
    - Maximum native "L4D2_GetVScriptOutput" code allowed seems to be 1006 characters.

    - Updated: Test plugin to reflect above changes.
    - Updated: Plugin, Include and GameData files.
__________________

Last edited by Silvers; 03-18-2020 at 14:02.
Silvers is offline
AK978
Senior Member
Join Date: Jun 2018
Old 04-04-2020 , 23:26   Re: [L4D & L4D2] Left 4 DHooks Direct (1.11) [18-Mar-2020]
Reply With Quote #65

use l4dinfectedbots.smx.
leve 1 spawn infected normal.
leve 2 spawn infected fail.
wait 2 min spawn infected fail the same.
unload left4dhooks.smx.
2 sec afer. spawn infected auto normal.

please help me.

Last edited by AK978; 04-05-2020 at 02:10.
AK978 is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 04-05-2020 , 03:23   Re: [L4D & L4D2] Left 4 DHooks Direct (1.11) [18-Mar-2020]
Reply With Quote #66

Quote:
Originally Posted by AK978 View Post
use l4dinfectedbots.smx.
leve 1 spawn infected normal.
leve 2 spawn infected fail.
wait 2 min spawn infected fail the same.
unload left4dhooks.smx.
2 sec afer. spawn infected auto normal.

please help me.

This was caused was l4d2_doorlock.smx preventing SI from spawning on the 2nd chapter of The Parish (at least from testing this was consistent to test). Removing the plugin mid-round allowed SI to return to spawning. The plugin was recompiled from using left4downtown to use left4dhooks, this is why it appeared that left4dhooks was at fault. I can only guess that removing left4dhooks made l4d2_doorlock.smx fail silently (still showed as active in plugins list with no error) even though it was using a forward dependent on left4dhooks. Not sure why it would fail silently, would need to test more.

I have a small update to left4dhooks fixing the last command that was added (index error showing wrong forward) but I am unable to upload to the forum, so that will have to wait.

Edit: fixed

Code:
1.12 (09-Apr-2020)
    - Added commands "sm_l4dd_detours" and "sm_l4dd_reload" as wrappers to "sm_l4dhooks_detours" and "sm_l4dhooks_reload".
    - Fixed command "sm_l4dhooks_detours" displaying the wrong forward, now also displays the plugin name using that forward.
__________________

Last edited by Silvers; 04-09-2020 at 10:16.
Silvers is offline
Tonblader
Senior Member
Join Date: Jul 2011
Location: Peru
Old 04-11-2020 , 18:56   Re: [L4D & L4D2] Left 4 DHooks Direct (1.12) [09-Apr-2020]
Reply With Quote #67

Im enter to my l4d2, create a Solo Game, then, my error logs files register:

L 04/11/2020 - 17:48:52: [SM] Exception reported: Invalid entity index passed for return value
L 04/11/2020 - 17:48:52: [SM] Blaming: left4dhooks.smx
L 04/11/2020 - 17:48:52: [SM] Call stack trace:
L 04/11/2020 - 17:48:52: [SM] [0] DHookSetReturn
L 04/11/2020 - 17:48:52: [SM] [1] Line 5963, C:\Servers\L4D2\left4dead2\addons\sourcemod\s cripting\left4dhooks.sp::OnFindScavengeItem

Im use Windows Listen:

Spoiler


meta list

Spoiler


sm exts list

Spoiler


sm plugins list


Last edited by Tonblader; 04-11-2020 at 19:06.
Tonblader is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 04-11-2020 , 19:10   Re: [L4D & L4D2] Left 4 DHooks Direct (1.12) [09-Apr-2020]
Reply With Quote #68

You have some plugin that uses "OnFindScavengeItem" and is setting the wrong value. Use sm_l4dd_detours command to find out which and contact that plugin author, I'm not responsible for their bad coding. Unlikely a problem with Left4DHooks as I tested returning 0 and valid entities. If you find out which plugin I'll take a look.

Quote:
Originally Posted by Silvers View Post
  • Developers are tasked with ensuring they provide valid client and entity indexes when using Natives.
  • This is to prevent duplicating checks and additional overhead inside left4dhooks.
__________________

Last edited by Silvers; 04-12-2020 at 07:51.
Silvers is offline
Tonblader
Senior Member
Join Date: Jul 2011
Location: Peru
Old 04-12-2020 , 11:26   Re: [L4D & L4D2] Left 4 DHooks Direct (1.12) [09-Apr-2020]
Reply With Quote #69

It is correct, I just removed the plugins that use "OnFindScavengeItem" and it is working correctly.

[L4D2] Bots Weapon Preference Manipulation.smx
[L4D2] Defib using bots.smx
heavy_gunner_bots-l4d2.smx

OFFTOPIC: I don't specifically understand how "OnFindScavengeItem" can cause these problems, the plugin that bots revive was very useful.

Last edited by Tonblader; 04-12-2020 at 11:43.
Tonblader is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 04-12-2020 , 11:58   Re: [L4D & L4D2] Left 4 DHooks Direct (1.12) [09-Apr-2020]
Reply With Quote #70

Quote:
Originally Posted by Tonblader View Post
It is correct, I just removed the plugins that use "OnFindScavengeItem" and it is working correctly.

[L4D2] Bots Weapon Preference Manipulation.smx
[L4D2] Defib using bots.smx
heavy_gunner_bots-l4d2.smx

OFFTOPIC: I don't specifically understand how "OnFindScavengeItem" can cause these problems, the plugin that bots revive was very useful.
Left4Downtown probably had extra checks to prevent errors, but I'm not adding extra checks, the plugins using any functions from L4DD should be validating the entities themselves.
__________________
Silvers 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 17:59.


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