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

[TF2] Fysics Control


Post New Thread Reply   
 
Thread Tools Display Modes
Author
thacursedpie
Member
Join Date: May 2008
Plugin ID:
3183
Plugin Version:
1.0.4
Plugin Category:
Gameplay
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    20 
    Plugin Description:
    Tweak bunnyhopping, airstrafing and bouncing. Supersedes "Real Fake bHop".
    Old 08-19-2012 , 11:14   [TF2] Fysics Control
    Reply With Quote #1

    Fysics Control
    (yes that's an "F" ;))

    Introdution
    Because my old "Real Fake bHop" mod had gotten a bit old and I really disliked the way I wrote it, I decided to do a total re-write. This mod comes with pretty much all of the old functionality, and quite a bit more. Which brings us to...

    Description
    Fysics Control (FC) aims to give server administrators a bit more control over the in-game physics. Let's sum up what the features are:

    * Ability to enable bunnyhopping and how easy it is to do.
    * Ability to change the strength of airstrafing (and to disable it completely, if needed)
    * Ability to enable players to "bounce" and how much strength the bounce has.
    Bouncing is exactly what the name implies it is: upon hitting the ground you bounce back up . All you need to do is hold CTRL + SPACE.
    * Do this all on a per-player basis, which comes in handy if you really like yourself (or want to bully someone else )

    I think the cvars explain it as well.

    Cvars
    Code:
    fc_version
    Plugin version
    
    // Airstrafe cvars
    // (start with "fc_airstrafe_")
    fc_airstrafe_mult
    The multiplier to apply to airstrafing
    Only values between 0 and 1 allowed. Values higher than 1 don't increase it anyway.
    
    fc_airstrafe_ignorescouts
    Sets the airstrafe multiplier to ignore scouts, since this tends to screw up double-jumps
    
    // Bunnyhop cvars
    // (start with "fc_bhop_")
    fc_bhop_enabled
    Whether or not players can bunnyhop
    
    fc_bhop_mult
    Horizontal boost to apply to bunnyhopping
    
    fc_bhop_zmult
    Boost to apply to vertical velocity when bunnyhopping
    
    fc_bhop_maxdelay
    Maximum time in seconds, after which the player has touched the ground and can still get a bhop boost
    
    fc_bhop_lazymode
    Whether or not player can bunnyhop simply by holding +jump
    
    fc_bhop_maxspeed
    The maximum speed for bunnyhopping. Use -1.0 for no max speed
    
    fc_bhop_angleratio
    Kind of complicated to explain. "Ratio between old and new velocity to be used with bunnyhopping". In general, you don't need to change this. The higher the value, the 'straighter' the bhop. The lower the value, the more 'curvy'.
    
    // Bounce cvars
    // (start with "fc_bounce_")
    fc_bounce_enabled
    Whether or not players can bounce
    
    fc_bounce_mult
    Modifies the strenght of a bounce
    Between 0.0 and 1.0 dampens the bounce, while values higher than 1.0 increase it.
    Now that's all nice and dandy, but I like to be able to mess around with people a bit. That's why at it's core my mod stores all the multipliers and the like for each individual player. Which allows you to change stuff on a per-player basis . So if you want to enable bouncing just for player "IamTehLeet", you would just use:

    Code:
    sm_bounce_enabled IamTehLeet 1
    So, for an overview...

    Cmds
    Note: admins need the SLAY flag to execute any of these commands. If you wish to change this, you can edit the flag at the top of the source file and re-compile.

    Code:
    sm_fc_reload
    Reloads Fysics Control
    
    sm_airstrafe_mult
    Change an individual user's airstrafe multiplier
    
    sm_bhop_enabled
    Enable/disable bhop on an individual user
    
    sm_bhop_mult
    Change an individual users's horizontal bhop multiplier
    
    sm_bhop_zmult
    Change an indivicual users's vertical bhop multiplier
    
    sm_bhop_lazymode
    Allow/dissallow an individual user to bunnyhop by holding +jump
    
    sm_bounce_enabled
    Allow/dissallow an individual user to bounce
    
    sm_bounce_mult
    Change an individual users's bounce multiplier
    Changing something through a cvar affects all players. Changing something through a cmd affects only the specified players. If you change something with either, you will always override the current settings. So neither cvars or cmds are more 'important', it's the last change that counts.

    Dependencies
    SDK hooks:
    http://forums.alliedmods.net/showthread.php?t=106748

    Installation

    Place fc.smx in your plugins folder.

    Known issues
    * I didn't get the mod to work on my newly installed PC. It turned out I needed the latest 1.4 snapshot because other Sourcemod versions didn't fire OnPlayerRunCmd. If the mod doesn't work, try other Sourcemod versions.
    * If you compile the plugin yourself you'll be presented with a 'tag mismatch' warning. I am aware of this and as far as I know there is no problem in this particular case.
    * Plugin doesn't compile on the forum because it relies on SDK hooks.

    Further notes
    * This plugin might also work with other source games, but I don't plan on supporting any other games, so it's listed as TF2 only.

    Changelog
    Code:
    1.0.4
    2012-12-10
    * Fixed a bug where players were not allowed to bhop unless 'fc_bhop_enabled' was switched off and switched on again.
    
    1.0.3
    2012-09-14
    * Fixed a bug where players were not allowed to bunnyhop while holding +duck and +jump.
    
    1.0.2
    2012-09-09
    * Bhop multipliers are now limited to being larger than or equal to 0.
    This in effect removes the functionality that a multiplier of -1 disabled bunnyhopping on an individual.
    
    * Added new admin-cmd: sm_bhop_enabled , which allows admins to disable bhop on individual players.
    Usage: sm_bhop_enabled <target> <0/1> . Ex: "sm_bhop_enabled thaCURSEDpie 1"
    
    1.0.1
    2012-08-19
    * Added fc_airstrafe_ignorescouts cvar, which defaults to 1. This cvar sets the airstrafe multiplier to ignore scouts, since this tends to screw up double-jumps.
    
    1.0.0 - Initial release
    2012-08-19
    Attached Files
    File Type: sp Get Plugin or Get Source (fc.sp - 1260 views - 19.5 KB)
    File Type: smx fc.smx (18.0 KB, 1890 views)

    Last edited by thacursedpie; 12-12-2012 at 03:15. Reason: v1.0.4
    thacursedpie is offline
    Fearts
    ferts of daeth
    Join Date: Oct 2008
    Old 08-19-2012 , 12:49   Re: [TF2] Fysics Control
    Reply With Quote #2

    Wish either there was a way to disable this on scouts or a way to allow scouts to still double jump. Because when you try to double jump with scout it wont let you.
    __________________
    Fearts is offline
    thacursedpie
    Member
    Join Date: May 2008
    Old 08-19-2012 , 13:45   Re: [TF2] Fysics Control
    Reply With Quote #3

    That's a bug, thanks for reporting (didnt test with scout, d'oh!). Will look at it either today or tomorrow.

    EDIT:
    Okay, so the issue was with applying a custom airstrafe multiplier to the scout. I've decided the easiest and most intuitive way to fix this is to just allow scouts to be ignored for the airstrafe-modifying. So I've added a new cvar "fc_airstrafe_ignorescouts", which defaults to 1. If you download the new version (1.0.1) all should be good.

    I've had brief thoughts about other fixes for this. Among the things I thought of were:
    * Only apply airstrafe modifier when the distance-to-ground is higher than a certain value.
    I decided against this because:
    1. Compared to the issue I'm trying to solve, it takes too much effort to implement.
    2. This would be non-intuitive for players, possibly resulting in frustrating situations.

    * Set up a special double-jump routine myself.
    I decided against this because:
    1. It takes more time to implement then my current solution .

    If anyone **really** wishes to block airstrafing on scouts, tell me so, then I might implement this.

    Last edited by thacursedpie; 08-19-2012 at 17:36. Reason: Update
    thacursedpie is offline
    danne2
    AlliedModders Donor
    Join Date: Jul 2011
    Location: Unoriginal computer joke
    Old 08-23-2012 , 11:25   Re: [TF2] Fysics Control
    Reply With Quote #4

    I've been using RFBhop for months. This looks like a nice recode.

    Good job. Installing it on my Deathrun server now.
    danne2 is offline
    thacursedpie
    Member
    Join Date: May 2008
    Old 08-23-2012 , 16:15   Re: [TF2] Fysics Control
    Reply With Quote #5

    Thanks, hope you like it
    thacursedpie is offline
    jimmjimm6699
    New Member
    Join Date: Sep 2012
    Old 09-01-2012 , 19:47   Re: [TF2] Fysics Control
    Reply With Quote #6

    I can't install it. It says "Plugin failed to compile! Please try to contact the author.
    jimmjimm6699 is offline
    thacursedpie
    Member
    Join Date: May 2008
    Old 09-02-2012 , 14:37   Re: [TF2] Fysics Control
    Reply With Quote #7

    The plugin won't compile on the forum because it requires SDKHooks ;). Just download the .smx from the first post.
    thacursedpie is offline
    Otokiru
    Senior Member
    Join Date: Apr 2012
    Old 09-08-2012 , 11:04   Re: [TF2] Fysics Control
    Reply With Quote #8

    Request: Enable bhop only for players with a certain flag or similar like bounce;
    sm_bhop_enabled IamTehLeet 1

    btw if i set sm_bounce_enabled IamTehLeet 0 does it disable the bounce?
    Otokiru is offline
    thacursedpie
    Member
    Join Date: May 2008
    Old 09-09-2012 , 05:18   Re: [TF2] Fysics Control
    Reply With Quote #9

    The functionality you requested was already present by setting a player's bhop multiplier to -1.0 . I understand however that this is a really inconsistent way of handling things, so I've updated the plugin for your request .

    I'm not able to test the plugin myself at this point in time, but it should work. Give it a whirl, if it doesn't work tell me. Otherwise I'll update the main post in a few days with this new version.

    changelog
    Code:
    * Bhop multipliers are now limited to being larger than or equal to 0.
    This in effect removes the functionality that a multiplier of -1 disabled bunnyhopping on an individual
    
    * Added new admin-cmd: sm_bhop_enabled , which allows admins to disable bhop on individual players.
    Usage: sm_bhop_enabled <target> <0/1> . Ex: "sm_bhop_enabled thaCURSEDpie 1"
    EDIT:
    And yes, that should disable the bouncing. Have you given it a try?

    EDIT:
    Don't use this version, it contains a breaking bug, which is fixed in version 1.0.4.
    Attached Files
    File Type: sp Get Plugin or Get Source (fc.sp - 621 views - 19.5 KB)
    File Type: smx fc.smx (18.0 KB, 634 views)

    Last edited by thacursedpie; 12-09-2012 at 18:57. Reason: Forgot to add attachments :P
    thacursedpie is offline
    Otokiru
    Senior Member
    Join Date: Apr 2012
    Old 09-13-2012 , 08:56   Re: [TF2] Fysics Control
    Reply With Quote #10

    Thx, i'll give it a try. Anyway, is there anyway that i can duck + bhop? somehow when i duck, it totally stop the bhop. bounce is off btw.
    Otokiru 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 12:40.


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