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

Anti Bunny Hop


Post New Thread Reply   
 
Thread Tools Display Modes
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:
    8 
    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 - 5605 views - 2.4 KB)

    Last edited by Mister_Magotchi; 12-08-2010 at 14:59.
    Mister_Magotchi is offline
    sinblaster
    Grim Reaper
    Join Date: Feb 2010
    Location: Australia
    Old 08-03-2010 , 05:47   Re: Anti Bunny Hop
    Reply With Quote #2

    You didnt?
    __________________
    Happy Happy Joy Joy

    sinblaster is offline
    Mister_Magotchi
    SourceMod Donor
    Join Date: Dec 2006
    Location: Nampa, Idaho
    Old 08-03-2010 , 13:52   Re: Anti Bunny Hop
    Reply With Quote #3

    I don't think anybody else was going to make a finished plugin that worked this way any time soon. I wanted one for my server right then, so I made one. It's different enough that it deserves its own thread, completely original idea or not.
    Mister_Magotchi is offline
    flawless13
    Member
    Join Date: Aug 2010
    Old 08-05-2010 , 01:41   Re: Anti Bunny Hop
    Reply With Quote #4

    great, thanks for this plugin,
    going to test it =)
    flawless13 is offline
    atom0s
    Senior Member
    Join Date: Jul 2009
    Old 08-05-2010 , 08:25   Re: Anti Bunny Hop
    Reply With Quote #5

    I see this being flawed to limit a clients speed after a jump occurs. You are altering any speed that occurs after a jump, meaning if a player jumps off a roof / box or anything that would result in them falling and taking damage, you would be effecting that fall speed. Which in turn could lead to people exploiting it to jump off things they normally wouldn't.
    atom0s is offline
    Mister_Magotchi
    SourceMod Donor
    Join Date: Dec 2006
    Location: Nampa, Idaho
    Old 08-05-2010 , 14:02   Re: Anti Bunny Hop
    Reply With Quote #6

    Quote:
    You are altering any speed that occurs after a jump, meaning if a player jumps off a roof / box or anything that would result in them falling and taking damage, you would be effecting that fall speed.
    This is false. The check occurs .1 seconds into the jump. At this point in the jump, the player is still heading roughly upwards because they just barely left the ground. If they are going over the threshold at this point (and if the threshold is over 1.45, they're therefore engaging in bunny-hopping), the punishment will kick in. They will maintain their exact position and direction they're heading (upward and probably forward), but their speed will change. If the punishment is negative, the same is true, but the direction will be reversed.

    If it did a check 1 second into a jump or something, you might have a point, but it doesn't.

    Also, this plugin doesn't affect falls.

    Also, the plugin doesn't affect vertical speeds. If I set the threshold to 1 (way too low for use as a bunny-hopping preventer, but useful for testing or for fun), people can still jump onto boxes without being affected, as long as they get close to the box and jump onto it, rather than running and jumping to it. As long as their X-Y speed doesn't exceed their weapon-specific maximum ground speed they wouldn't be affected.

    Last edited by Mister_Magotchi; 08-08-2010 at 19:06. Reason: typo
    Mister_Magotchi is offline
    flawless13
    Member
    Join Date: Aug 2010
    Old 08-06-2010 , 01:21   Re: Anti Bunny Hop
    Reply With Quote #7

    i tested the plugin and it's working
    but i noticed that it isn't possible anymore
    to make zoomed jumps to the side...
    is there a possibility to fix that?
    flawless13 is offline
    Mister_Magotchi
    SourceMod Donor
    Join Date: Dec 2006
    Location: Nampa, Idaho
    Old 08-06-2010 , 04:56   Re: Anti Bunny Hop
    Reply With Quote #8

    I'll look into it some time this weekend and try to fix it. Thanks for letting me know. I rarely ever use scoped weapons, so I may have never noticed.
    Mister_Magotchi is offline
    GoD-Tony
    Veteran Member
    Join Date: Jul 2005
    Old 08-07-2010 , 01:40   Re: Anti Bunny Hop
    Reply With Quote #9

    Looks good. I'm hoping it can help with the issue I'm having here.

    Quote:
    Originally Posted by Mister_Magotchi View Post
    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.
    What would you recommend for (the now mandatory) 66 tick?
    GoD-Tony is offline
    Mister_Magotchi
    SourceMod Donor
    Join Date: Dec 2006
    Location: Nampa, Idaho
    Old 08-07-2010 , 01:50   Re: Anti Bunny Hop
    Reply With Quote #10

    66 tick isn't mandatory: http://didrole.com/tickrate_enabler/
    It's just the standard functionality of the game. I don't want to get into an argument here over which tickrate is superior, either.

    Either way, when developing this plugin using a listenserver on my own computer, which was running with completely default FPS and tickrate (66), 1.5 (%50 above the weapon-specific maximum ground speed) seemed like a good threshold to me. After releasing the plugin and doing more testing on my clan's server (running at 100 tick, 2000fps), it seemed like 1.5 was too high of a limit. If you read the "Nice Details to Know" section, you can find out how to turn a sort of testing mode on in the plugin to figure out a good threshold. I know I could have included that functionality as a cvar or something, but I didn't.
    Mister_Magotchi 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 19:48.


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