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