Raised This Month: $32 Target: $400
 8% 

[L4D2] Target Patch - Hunter and Tank (1.1) [13-Jan-2020]


Post New Thread Reply   
 
Thread Tools Display Modes
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 01-16-2020 , 12:22   Re: [L4D2] Target Patch - Hunter and Tank (1.0) [13-Jan-2020]
Reply With Quote #21

Quote:
Originally Posted by MasterMind420 View Post
CommandABot could be used to do this...
Both this plugin and L4D1 version now support special infected ignoring incapped.

PHP Code:
l4d2_target_patch_targets "0" // 0=Off. Block these Special Infected from targeting incapped players: 1=Smoker, 2=Boomer, 4=Hunter, 8=Spitter, 16=Jockey, 32=Charger, 64=Tank, 127=All. Add numbers together. 
__________________
Silvers is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 01-16-2020 , 14:04   Re: [L4D2] Target Patch - Hunter and Tank (1.0) [13-Jan-2020]
Reply With Quote #22

Quote:
Originally Posted by Silvers View Post
Both this plugin and L4D1 version now support special infected ignoring incapped.

PHP Code:
l4d2_target_patch_targets "0" // 0=Off. Block these Special Infected from targeting incapped players: 1=Smoker, 2=Boomer, 4=Hunter, 8=Spitter, 16=Jockey, 32=Charger, 64=Tank, 127=All. Add numbers together. 
ahh nice...very impressive
MasterMind420 is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 01-16-2020 , 19:33   Re: [L4D2] Target Patch - Hunter and Tank (1.1) [13-Jan-2020]
Reply With Quote #23

THIS PLUGIN IS OBSOLETE. USE THIS INSTEAD: [L4D & L4D2] Target Override


This was supposed to be a simple plugin to enable the Tank and Hunter to target incapacitated players. Now after loads of requests and modifications it's getting to the point where I'm denying all future requests. I may possibly add a forward for 3rd party plugins to make use of the detour. This is the last feature addition and I'll only support bug fixes.

Again this is untested because I really can't be bothered to sit for ages testing all different cvar combinations and conditions. At some point I will before adding to the main post if no one reports working/broken issues. Please test and report back.

Code:
1.5 (17-Jan-2020)
    - Added cvar "l4d2_target_patch_incap" to control the following:
    1. Only target vomited and incapacitated players. - Requested by "ReCreator".
    2. Only target incapacitated when everyones incapacitated. - Requested by "Mr. Man".
Previous version 1.4 found at post #9. Also untested.
__________________

Last edited by Silvers; 03-23-2020 at 10:29.
Silvers is offline
xZk
Senior Member
Join Date: Nov 2017
Location: cl
Old 01-16-2020 , 22:15   Re: [L4D2] Target Patch - Hunter and Tank (1.1) [13-Jan-2020]
Reply With Quote #24

Quote:
Originally Posted by Silvers View Post
I guess the problem is ChooseVictim gets called often, like every frame or every 0.1 seconds. I could add a delay between choosing new victims. This is another reason I wanted to patch instead of detour the function. To allow the game to correctly choose a victim instead of some hackish style workaround as is the current method. With patching I could remove the parts of code ignoring incapped and vomited survivors, but it only worked on the Tank and not the Hunter for some reason, also required multiple patches and potentially affect all SI. So in the end I settled on detouring. The detour method opened up the ability to choose which Special Infected should ignore or target incapped.

Maybe I should add a forward for 3rd party plugins to choose victims themselves.


Edit: updated post #9 with 1.3. Again it's untested:
Code:
1.3 (14-Jan-2020)
    - Added cvar "l4d2_target_patch_wait" to delay between switching targets unless current target is invalid.
    - Now using "GetClientsInRange" to select potentially visible clients. Thanks to "Peace-Maker" for recommending.
the tank is still out of control of its arms :s ...valve i hate you xd
xZk is offline
hoanganh81097
Senior Member
Join Date: Apr 2016
Old 01-27-2020 , 14:20   Re: [L4D2] Target Patch - Hunter and Tank (1.1) [13-Jan-2020]
Reply With Quote #25

can you add more SI ?
hoanganh81097 is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 01-27-2020 , 14:25   Re: [L4D2] Target Patch - Hunter and Tank (1.1) [13-Jan-2020]
Reply With Quote #26

See everyone wants 100 different options and features. It might be better to make the main plugin handle the detour and provide forwards, then 3rd party plugins can handle the different options and features people want, of course then you have race conditions or whatever the terminology is where depending on plugin load it might cause different results than expected. So I really don't know what to do hence why I haven't been updating this and just seeing where it goes.
__________________
Silvers is offline
hoanganh81097
Senior Member
Join Date: Apr 2016
Old 01-28-2020 , 03:51   Re: [L4D2] Target Patch - Hunter and Tank (1.1) [13-Jan-2020]
Reply With Quote #27

I got some error
PHP Code:
L 01/28/2020 00:49:07SourceMod error session started
L 01
/28/2020 00:49:07Info (map "c2m2_fairgrounds") (file "errors_20200128.log")
L 01/28/2020 00:49:07: [SMException reportedFailed to find "BossZombiePlayerBot::ChooseVictim" signature.
L 01/28/2020 00:49:07: [SMBlamingl4d2_target_patch.smx
L 01
/28/2020 00:49:07: [SMCall stack trace:
L 01/28/2020 00:49:07: [SM]   [0SetFailState
L 01
/28/2020 00:49:07: [SM]   [1Line 76l4d2_target_patch.sp::OnPluginStart
L 01
/28/2020 00:49:07: [SMUnable to load plugin "l4d2_target_patch.smx"Error detected in plugin startup (see error logs)
L 01/28/2020 00:49:33Error log file session closed
hoanganh81097 is offline
Gold Fish
Senior Member
Join Date: Mar 2020
Old 03-01-2021 , 02:35   Re: [L4D2] Target Patch - Hunter and Tank (1.1) [13-Jan-2020]
Reply With Quote #28

Can you show a small example of how to easily rewrite a target for a particularly infected one without: DHooks Extension using the BossZombiePlayerBot :: ChooseVictim function?
Gold Fish is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 06-16-2021 , 06:00   Re: [L4D2] Target Patch - Hunter and Tank (1.1) [13-Jan-2020]
Reply With Quote #29

Quote:
Originally Posted by CrAzYno0oB View Post
Anyone got l4d2_target_patch.sp?
Quote:
Originally Posted by Silvers View Post
THIS PLUGIN IS OBSOLETE. USE THIS INSTEAD: [L4D & L4D2] Target Override
__________________
Silvers 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 10:26.


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