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

[L4D2] Block heatseeking chargers


Post New Thread Reply   
 
Thread Tools Display Modes
Author
sheo
SourceMod Donor
Join Date: Jul 2013
Location: Russia, Moscow
Plugin ID:
3912
Plugin Version:
1.2
Plugin Category:
Technical/Development
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Fixes heatseeking chargers after tank spawn
    Old 09-21-2013 , 17:23   [L4D2] Block heatseeking chargers
    Reply With Quote #1

    Description
    Heatseeking chargers is a really irritating bug. You can see this trick on this video: http://youtu.be/-w1iWOx72LU?t=5m

    What exactly does the plugin do?
    When the human charger gets tank while in charge, his charger continues running as normal, without turning around.

    Cvars:
    l4d2_block_heatseeking_chargers_version

    Changelog:
    1.2
    - Implemented new method of blocking heatseeking chargers, now the charger just continues charging straightly instead of stopping the attack (thanks to dcx2)

    1.1
    - Fixed possible non-changer infected detecting as heatseeking charger

    1.0
    - Initial release
    Attached Files
    File Type: sp Get Plugin or Get Source (blockheatseekingchargers.sp - 1721 views - 2.0 KB)

    Last edited by sheo; 04-19-2016 at 16:49.
    sheo is offline
    dcx2
    Senior Member
    Join Date: Sep 2011
    Old 10-04-2013 , 01:26   Re: [L4D2] Block heatseeking chargers
    Reply With Quote #2

    That looks exactly like Silvers' Charger Steering. Charger Steering was enabled by clearing the frozen flag from the charger while he was charging. I bet you could re-apply the frozen flag to the AI charger instead of just stopping him entirely.

    PHP Code:
    SetEntProp(botProp_Send"m_fFlags"GetEntProp(botProp_Send"m_fFlags") | FL_FROZEN); 
    __________________
    dcx2 is offline
    sheo
    SourceMod Donor
    Join Date: Jul 2013
    Location: Russia, Moscow
    Old 10-04-2013 , 12:55   Re: [L4D2] Block heatseeking chargers
    Reply With Quote #3

    Well, i tested it out and it works! Thank you, dcx2, this is really good.
    P.S.: Im new at sourcepawn and have not really learned working with entities ;-)
    sheo is offline
    BloodyBlade
    Senior Member
    Join Date: Feb 2018
    Old 01-18-2024 , 15:33   Re: [L4D2] Block heatseeking chargers
    Reply With Quote #4

    * Transfering the source code to the latest syntax.
    * Added a plug-in on/off variable with a check for changing the value of the variable.
    * Event hooks have been moved to OnConfigsExecuted().
    * Optimized the code.
    Attached Files
    File Type: sp Get Plugin or Get Source (blockheatseekingchargers.sp - 38 views - 2.6 KB)
    BloodyBlade is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 01-18-2024 , 16:15   Re: [L4D2] Block heatseeking chargers
    Reply With Quote #5

    Quote:
    Originally Posted by BloodyBlade View Post
    * Transfering the source code to the latest syntax.
    * Added a plug-in on/off variable with a check for changing the value of the variable.
    * Event hooks have been moved to OnConfigsExecuted().
    * Optimized the code.
    Again, as I mentioned in another post, you are going to be hooking the events multiple times. See what I do in my plugins have a static bool within the hook/unhook function to track if they have been hooked or not.

    Also: you don't need "public" for callbacks you have named yourself, only those from SM and 3rd party plugin forwards.
    __________________

    Last edited by Silvers; 01-18-2024 at 16:17.
    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 22:37.


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