View Single Post
Author Message
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 01-13-2020 , 06:42   [L4D2] Target Patch - Hunter and Tank (1.1) [13-Jan-2020]
Reply With Quote #1

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



Related Plugins:

About:
  • Restores L4D1 game behaviour so the Hunter and Tank can attack incapacitated and vomited players.
  • This overrides the ChooseVictim function, by setting the nearest survivor as target.
  • Can also prevent specific Special Infected from targeting incapacitated survivors.
  • Does not account for line of sight which would need constant inefficient trace rays.
  • Trace rays could be fired every half a second or so. Only request if really needed.


Thanks:
  • Sev - For the idea and request.
  • BlackSabbarh - Also for the request.
  • Lux - For fixing God Frames detour which is similar to this, and would not be possible without.


Cvars:

Saved to l4d2_target_patch.cfg in your servers \cfg\sourcemod\ folder.

PHP Code:
// 0=Plugin off, 1=Plugin on.
l4d2_target_patch_allow "1"

// Turn on the plugin in these game modes, separate by commas (no spaces). (Empty = all).
l4d2_target_patch_modes ""

// Turn off the plugin in these game modes, separate by commas (no spaces). (Empty = none).
l4d2_target_patch_modes_off ""

// Turn on the plugin in these game modes. 0=All, 1=Coop, 2=Survival, 4=Versus, 8=Scavenge. Add numbers together.
l4d2_target_patch_modes_tog "0"

// Which Special Infected should override victims. 1=Hunters. 2=Tanks. 3=Both.
l4d2_target_patch_special "3"

// 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.
l4d2_target_patch_targets "0"

// Target Patch plugin version.
l4d2_target_patch_version 


Changes:
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.

1.2 (13-Jan-2020)
    - Added cvar "l4d2_target_patch_targets" to control which Special Infected cannot target incapped survivors.
    - If used, this will change those specified Special Infected to target the nearest non-incapped survivor.

1.1 (13-Jan-2020)
    - Fixed mistake causing error with "m_isHangingFromLedge". Thanks to "Astrostar" for reporting.

1.0 (13-Jan-2020)
    - Initial release.


Requirements:

Installation:
DO NOT click 'Get Plugin' or it will fail to compile because this plugin requires DHooks!
  1. Download the .smx file and put into your servers \addons\sourcemod\plugins folder.
  2. Download the .txt gamedata file and put into your servers \addons\sourcemod\gamedata\ folder.


Updating from 1.1 or older:
  • New cvars have been added: use the Cvar Configs Updater, or delete the old cvars config or manually add them.
__________________

Last edited by Silvers; 03-23-2020 at 10:28.
Silvers is offline