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

[L4D2] Double hunter and smoker patch


Post New Thread Reply   
 
Thread Tools Display Modes
Author
JLmelenchon
Senior Member
Join Date: Mar 2019
Plugin ID:
8313
Plugin Version:
1.4
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Old 12-05-2022 , 07:02   [L4D2] Double hunter and smoker patch
    Reply With Quote #1

    This plugin is to prevent double smoker and hunters bots when teams are not full, it will only kill the bots of these class when a smoker or a hunter player has already spawned.

    Knowns issues:
    In versus does not prevent it when human player spawn after the bot, so while it does not fix the problem entirely it will greatly limit it. Player spawn event does not trigger when player is in ghost state, will try to find something else.
    Attached Files
    File Type: sp Get Plugin or Get Source (Anti_double_SI_patch.sp - 196 views - 7.1 KB)

    Last edited by JLmelenchon; 12-12-2022 at 16:30. Reason: fixed bugs
    JLmelenchon is offline
    JLmelenchon
    Senior Member
    Join Date: Mar 2019
    Old 12-05-2022 , 11:35   Re: [L4D2] Double hunter and smoker patch
    Reply With Quote #2

    Version 1.1
    Fixed many clients index errors.

    Next i will see if it is possible to unhook the death sound and hide the body.

    Last edited by JLmelenchon; 12-05-2022 at 11:35.
    JLmelenchon is offline
    NoroHime
    Veteran Member
    Join Date: Aug 2016
    Location: bed
    Old 12-05-2022 , 12:56   Re: [L4D2] Double hunter and smoker patch
    Reply With Quote #3

    Quote:
    Originally Posted by JLmelenchon View Post
    Version 1.1
    Fixed many clients index errors.

    Next i will see if it is possible to unhook the death sound and hide the body.
    well why not you just kick it
    =====
    some advices
    can easy to just L4DD to process these, like forward
    PHP Code:
    // ====================================================================================================
    // FORWARDS - left4downtown.inc (and new ones by Silvers)
    // ====================================================================================================
    /**
     * @brief Called whenever ZombieManager::SpawnSpecial(ZombieClassType,Vector&,QAngle&) is invoked
     * @remarks Only used for bot special spawns (not players)
     * @remarks zombieClass: 1=Smoker, 2=Boomer, 3=Hunter, 4=Spitter, 5=Jockey, 6=Charger
     *
     * @param zombieClass    Zombie class that will be spawned
     * @param vecPos        Vector coordinate where special will be spawned
     * @param vecAng        QAngle where special will be facing
     *
     * @return                Plugin_Handled to block special from spawning,
     *                         Plugin_Changed to change the zombie class type to spawn, Plugin_Continue otherwise.
     */
    forward Action L4D_OnSpawnSpecial(int &zombieClass, const float vecPos[3], const float vecAng[3]); 
    and change the zombieClass, then you dont have to kick new zombie
    , for upload file, if you name file to .sp, the .smx file will automatically compile by forum, so you dont have to upload .smx yourself
    __________________

    Last edited by NoroHime; 12-05-2022 at 13:05.
    NoroHime is offline
    JLmelenchon
    Senior Member
    Join Date: Mar 2019
    Old 12-05-2022 , 13:20   Re: [L4D2] Double hunter and smoker patch
    Reply With Quote #4

    You are right the kick work better, i will change it.

    Thanks for the native of left4dhooks, i will try to see how to make it works.
    JLmelenchon is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 12-05-2022 , 13:34   Re: [L4D2] Double hunter and smoker patch
    Reply With Quote #5

    I already wrote a plugin that does this: Special Infected Limit

    Uses the z_*_limit cvar values to limit the maximum number of each Special Infected type allowed to be alive.
    __________________
    Silvers is offline
    JLmelenchon
    Senior Member
    Join Date: Mar 2019
    Old 12-06-2022 , 06:51   Re: [L4D2] Double hunter and smoker patch
    Reply With Quote #6

    Quote:
    Originally Posted by Silvers View Post
    I already wrote a plugin that does this: Special Infected Limit

    Uses the z_*_limit cvar values to limit the maximum number of each Special Infected type allowed to be alive.
    I tested your plugin and i have the default z_smoker_limit which is on 1 according to the wiki, i tried both spawning before and after the smoker/hunter bot and none was prevented. I will admit that i don't have the last version of left4dhooks but unless you fixed a bug on the native recently it should not matter.

    The convar not being respected by the game in versus and throwing double SI with bots when you don't have a full team of players in infected is a long time issue. Anyway i had fun rack my brain trying to fix the problem and i think my plugin works pretty well, also it does not have a dependency.
    Attached Thumbnails
    Click image for larger version

Name:	20221206122632_1.jpg
Views:	145
Size:	95.3 KB
ID:	198365  

    Last edited by JLmelenchon; 12-06-2022 at 08:19. Reason: w
    JLmelenchon is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 12-06-2022 , 12:09   Re: [L4D2] Double hunter and smoker patch
    Reply With Quote #7

    Upload the file as .sp and remove the .smx.
    __________________
    Silvers is offline
    JLmelenchon
    Senior Member
    Join Date: Mar 2019
    Old 12-06-2022 , 14:15   Re: [L4D2] Double hunter and smoker patch
    Reply With Quote #8

    version 1.3

    -Added a check to ignore the bot if he managed to grab a survivor before being kicked (unlikely)
    -Augmented a little the timer so player spawn event does not trigger before bot replacing player on tank spawn.

    Last edited by JLmelenchon; 12-06-2022 at 14:15.
    JLmelenchon is offline
    alasfourom
    Senior Member
    Join Date: Feb 2022
    Location: Saudi Arabia
    Old 12-06-2022 , 14:17   Re: [L4D2] Double hunter and smoker patch
    Reply With Quote #9

    Quote:
    Originally Posted by JLmelenchon View Post
    I tested your plugin and i have the default z_smoker_limit which is on 1 according to the wiki, i tried both spawning before and after the smoker/hunter bot and none was prevented. I will admit that i don't have the last version of left4dhooks but unless you fixed a bug on the native recently it should not matter.

    The convar not being respected by the game in versus and throwing double SI with bots when you don't have a full team of players in infected is a long time issue. Anyway i had fun rack my brain trying to fix the problem and i think my plugin works pretty well, also it does not have a dependency.
    For versus, you will need to use this convar: z_versus_smoker_limit “1”, instead of z_smoker_limit “1”.
    __________________
    alasfourom is offline
    JLmelenchon
    Senior Member
    Join Date: Mar 2019
    Old 12-06-2022 , 15:49   Re: [L4D2] Double hunter and smoker patch
    Reply With Quote #10

    Quote:
    Originally Posted by alasfourom View Post
    For versus, you will need to use this convar: z_versus_smoker_limit “1”, instead of z_smoker_limit “1”.
    They are all on 1 by default.
    JLmelenchon 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 15:35.


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