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

Anti Bunny Hop


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author
Mister_Magotchi
SourceMod Donor
Join Date: Dec 2006
Location: Nampa, Idaho
Plugin ID:
1853
Plugin Version:
1.0.1
Plugin Category:
Gameplay
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    9 
    Plugin Description:
    Limits player jump speed based on weapon-specific maximum ground speed with configurable speed punishment.
    Old 08-03-2010 , 03:15   Anti Bunny Hop
    Reply With Quote #1

    Anti Bunny Hop

    Limits player jump speed based on weapon-specific maximum ground speed with configurable speed punishment.

    A player's speed is checked .1 seconds into each jump. If their speed exceeds the threshold set, their speed is set to a configurable punishment speed for the duration of the jump.

    As of the 2010-08-17 Counter-Strike: Source update, the new sv_enablebunnyhopping cvar is set to 0 by default. This appears to have made this plugin obsolete for preventing bunny-hopping in Counter-Strike: Source, but people have reported in this thread that it works in other games. I have not tested it in anything but Counter-Strike: Source, but I can't see why it wouldn't work. Originally I had this marked as a CS:S plugin, but I changed it to Any after others said it works. Someone has recently said in the replies that it doesn't work in DOD: Source.

    As an added bonus, this plugin can also be used to allow everyone to jump much faster (and therefore farther) than usual. This makes for some pretty good fun on an occasional basis.

    Cvars:

    sourcemod/anti-bunny-hop.cfg is auto-generated with the default settings:
    • sm_anti_bunny_hop_ratio_threshold - Ratio of [air speed .1 seconds into jump] over [weapon-specific maximum ground speed] at which punishment should happen. 1.45 or greater seems safe. 0 disables the plugin. Default: 1.45
    • sm_anti_bunny_hop_ratio_punish - Ratio of [speed after punishment] over [weapon-specific maximum ground speed]. Anything under 1.45 makes sense. Setting this equal to the threshold limits speed to the threshold without any punishment. Default: 0.75

    I found that on my server (100 tick), 1.45 is a pretty workable threshold.
    My personal favorite settings are 1.45 for the threshold and -1.45 for the punishment.

    Example Configurations:

    Code:
    //If player goes more than %45 above max. ground speed in jump,
    //their speed is set to %75 of max. ground speed.
    //Default setting.  Some punishment for trying to bunnyhop.
    sm_anti_bunny_hop_ratio_threshold 1.45
    sm_anti_bunny_hop_ratio_punish 0.75
    
    //If player goes more than %45 above max. ground speed in jump,
    //they are slowed to %45 above max. ground speed.
    //No punishment, but they also can't exceed the limit.
    sm_anti_bunny_hop_ratio_threshold 1.45
    sm_anti_bunny_hop_ratio_punish 1.45
    
    //If player goes more than %45 above max. ground speed in jump,
    //they are stopped at their current X-Y position and fall to the ground.
    //Extreme punishment.
    sm_anti_bunny_hop_ratio_threshold 1.45
    sm_anti_bunny_hop_ratio_punish 0
    
    //If player goes more than %45 above max. ground speed in jump,
    //they are sped up to 10 times the max. ground speed.
    //Crazy.  Minorly fun.  Probably not a punishment.
    sm_anti_bunny_hop_ratio_threshold 1.45
    sm_anti_bunny_hop_ratio_punish 10
    
    //If player exceeds max. ground speed in jump,
    //as most people do in every jump they make,
    //they are sped up to 10 times the max. ground speed.
    //Extremely crazy.  Everyone flies around map.
    sm_anti_bunny_hop_ratio_threshold 1
    sm_anti_bunny_hop_ratio_punish 10
    
    //If player goes more than %45 above max. ground speed in jump,
    //they are sent back to about where they started their jump.
    //Strange punishment.
    sm_anti_bunny_hop_ratio_threshold 1.45
    sm_anti_bunny_hop_ratio_punish -1.45
    
    //If player goes more than %45 above max. ground speed in jump,
    //they are sent back to about where they started their jump
    //at extremely high speed, and will probably die from fall damage.
    //Sure beats slaying them.
    sm_anti_bunny_hop_ratio_threshold 1.45
    sm_anti_bunny_hop_ratio_punish -10
    Version History:
    • 1.0.0 - 2010-08-03 - Initial release
    • 1.0.1 - 2010-08-07 - Fixed zoomed jump problem experienced with some guns. Change default threshold to 1.45 .
    Nice Details to Know:

    If you look in the code, there's a commented line that says "Ratio Test" at the end of it. If you uncomment that line (remove the "//" at the beginning) and recompile the plugin, every time you jump, you'll see your current threshold and your current speed ratio (current speed over weapon-specific max. ground speed). This would be useful to decide what threshold you want to use on your server.

    Known Issues:

    When gravity is lower, your jump speeds increase, while the weapon-specific maximum ground speeds stay the same. To compensate, the threshold should be increased if gravity is decreased.

    Special Thanks:
    • LumiStance - creator of the Slow Hop plugin on which my plugin is partially based.
    • blodia - posted the idea in the forums for basing the speed on the current weapon's max ground speed and told me about it.
    Attached Files
    File Type: sp Get Plugin or Get Source (anti-bunny-hop.sp - 5623 views - 2.4 KB)

    Last edited by Mister_Magotchi; 12-08-2010 at 14:59.
    Mister_Magotchi is offline
     



    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 12:51.


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