Crouch Jumping Server Script v8

Author Topic: Crouch Jumping Server Script v8  (Read 5353 times)

This script implements a crouch-jump feature reminiscent of Half-Life and similar games.
If you're in the air and you crouch, you get sent up a bit allowing you to reach higher areas.

Author: piber20
A few lines of code were based on a sniplet provided by Carbon Zypher.
Version 8

Here is a .gif showing the crouch jump in action when set to the maximum setting (the default):


The 5 block high red wall can be scaled by default, just by jumping over it. To scale the 8 block high blue wall, you must crouch in the air. The 10 block high yellow wall represents the limit of your jump height by default, and cannot be scaled or looked over, the crouch jump does nothing to change this fact.

Crouch jump height can be changed by editing the pref $Pref::Server::CrouchJump::HeightInPlates (default is 7). For the best FPS-like/half-life-like experience I recommend you try out the Half-Life-Like playertype below that replicates movement of Half-Life including utilising features from this script. You must have this script activated to make the playertype work, otherwise it's just a slower quake-like player.

You can bypass the maximum/minimum by changing the pref $Pref::Server::CrouchJump::BypassHeightMax to True

You can change how fast the air detection ticks are by changing the $Pref::Server::CrouchJump::TickLength pref. By default it is 20. Set it higher to improve server performance at the cost of it being less accurate.

Links
Download Server_CrouchJump.zip v8
Download Player_Half-Life.zip

If you cannot access my website for whatever reason, please check the mirrors below:
View on Blockland Nexus
View on Blockland Glass

Feel free to suggest changes and provide your constructive criticism. Don't make it nasty.
« Last Edit: July 27, 2017, 01:39:11 PM by Crispy_ »


what happens if you change the pref to say 50

It forces it back to 7 when it detects that it is higher than that.


Here's a version that doesn't limit how high you can put the pref (Have fun!)
http://leopard.hosting/download.php?f=qcscr&name=Script_CrouchJump.zip
« Last Edit: September 05, 2016, 11:57:04 PM by Ipquarx »

Thanks, but just a slight warning - the code in its current state wasn't built for crouch jumps past 7, so you might get stuck or crouch straight through ceilings.


Thanks, but just a slight warning - the code in its current state wasn't built for crouch jumps past 7, so you might get stuck or crouch straight through ceilings.
After a little testing I can tell you with certainty that you can clip through at least 1-plate ceilings with this. It's a little difficult, but not unreasonable.

After a little testing I can tell you with certainty that you can clip through at least 1-plate ceilings with this. It's a little difficult, but not unreasonable.
There's also the current problem where you cant crouch jump too well around ramps/cornerbricks/modter bricks that are not cuboid(these probably cant be fixed). It's far from perfect at the moment. For the clipping though, I have been hosting deathmatches with this script, it hasnt been very popular but i haven't seen people complain about being stuck yet. It's likely a very rare occurance at the moment and I should do more investigation
« Last Edit: September 06, 2016, 12:00:06 AM by Crispy_ »


Alright I've updated the script to version 6. I did more adjustments to hopefully stop people from crouching through ceilings. I've also added two new prefs.

Set $Pref::Server::CrouchJump::BypassHeightMax to true to bypass the normal maximum/minimum. You're still limited from -2000000000 to 2000000000 even with this set to true, but I don't think that's a problem. You will obviously go through bricks/the ground if you set it to crazy high/low numbers.

Change $Pref::Server::CrouchJump::TickLength to make the script check if players are in the air less/more often. Default is 20. 1 is the most accurate but that might affect server performance a lot more, not too sure.
Note: It checks for each player, but only after they have done a successful crouch jump, it stops checking if it detects they have landed.

Server sided?
Yes. I'm pretty sure it's impossible do this client sidedly, don't think you can even do that with those cheat dlls or whatever.

Should I rename the file to Server_CrouchJump? Might be less confusing.

EDIT: The default tick speed of 20 might harm your servers' performance if you have more than a handful of players. I recommend 100, as that used to be the default and it was accurate enough to work. It usually fails to detect if a player has landed if they hold down the jump key and just move around, however.
« Last Edit: September 06, 2016, 06:53:33 PM by Crispy_ »

Did an "update" because I changed the name from Script_ to Server_ to confuse less. You will need to manually go into your add-ons folder and delete the Script_ version, as the Server_ version wont overwrite it. I should have called it Server_ to start off with, but at least I'm fixing it now.

boop
« Last Edit: July 27, 2017, 01:37:13 PM by Crispy_ »

Woah! I'm still updating this old thing?


v8:

- Reverted default tick length pref back to 100

- Added RTB pref support

I combed through a few of my add-ons to add RTB pref support. You will probably see 2 more of my old topics bumped up.