Bounce AlertThis SourceMod plugin is more or less an extension of bcheck, but it is approached in a very different way. This plugin allows for you to check for a possible bounce, crouched or uncrouched, while you are moving in the air. It does
not take the height that you are standing at and determine what types of bounces you can do (ex. ctap uncrouch, walk off crouch) like bcheck does.
This plugin takes your velocity, position, and the position of a surface, and calculates in real time what bounces are possible, if any.
You can check for the bounces in 3 ways:
Registered panels: Using the ba_reg or ba_register command while pointing at a surface, you can register that height. Then, to determine if you can bounce off of it, use ba_man or ba_manual. To delete the registered panel, use ba_del or ba_delete. This I limited because each user can only have one registered height at a time and you have to ba_reg each time, but it still might have some purpose.
Directly beneath you: The command ba_below or ba_bel will let you know if you are capable of bouncing off of the platform below you.
Where you are aiming: The command ba_loc or ba_location will let you know if you can bounce off of the platform you are looking at.
Just bind whichever these commands you find most useful to an unused mouse button or whatever you feel like and press the bind while you are moving following the instructions above and the plugin will tell you in chat "CROUCHED", "UNCROUCHED", or "CROUCHED OR UNCROUCHED".
Another thing that came from this plugin - when I was testing I noticed that some ctaps didn't produce the same results with my plugin vs good ol' bcheck, so I started to think that my plugin was broken. But it turns out, there are multiple heights you can get from a ctap jump. For example, on tx 6, robs plugin says ctap uncrouched. My plugin sometimes would say uncrouched when you test and sometimes would say crouched. That jump, depending on the ctap itself, can be done both crouch and uncrouch ctap bounce, even though bcheck doesn't list the crouched. This is the only ctap I could find that produced crouch and uncrouch depending on the ctap, all the other ctap bounces (ex. jump_bounce 4 or 5) alternate between crouch/uncrouch and no bounces. I think this happens because of either the length of the crouch, or the time between uncrouch and jump, or maybe both.
Let me know if you had any questions or find any bugs - this plugin was only tested multiplayer with up to 3 players, and rarely any map changes or anything that might affect the plugin.
Thanks to: Jamien for spreadsheet, Rob for bcheck and ideas about the plugin, as well as testing. Also thanks to guyyst for testing and zigzati for testing every uncrouch bounce
If you are interested in the physics or any aspect of the plugin, I spent a great deal of time commenting the code, and it provides a decent description of how the plugin works. Beware though, this was my first time with sm, so my code is really terrible.
Plugin+Source: http://www.mediafire.com/download/301pofz51471kil/BounceAlert.rarEdit: Made a plugin to test the bounces. It's just a save plugin but it saves velocity and angles too and lets you do it in midair. I just save when my plugin detects a bounce and test until I can get it to work. So far I've only not been able to do one, and I think that's because I'm bad, not because of the plugin.
Known Problems:
- I just realized that this plugin won't work if the plat you are trying to bounce on has nogrenades so in other words it wont detect bouncehops on platforms that you can't - not sure if I feel like fixing.