[FilterScript] Southclaw's Underwater Swimming Fix
#1

Southclaw's Underwater Swimming Fix

What?
Here's something I just made and tested, it's a small fix for something that's been annoying me for a long time!

Ever tried to swim through some underwater structure to find you get pushed up to the ceiling and get stuck? I have a custom level that contains some pipes that lead underwater and people get stuck down there and die all the time! I did a test and you get boosted up at a velocity of around 0.01715.

I just made this quickly to fix that problem, while you are underwater and you are looking either straight ahead or down your player will get a downwards (Z) velocity boost of 0.0026 to keep you at a constant depth.
Videos
A video comparison could probably better explain what this code does, but my main PC has a broken PSU and the one I'm using now can only just play SA:MP let alone record!

I'll add one as soon as my PC is fixed.
Download
Pastebin
(Requires y_timers)
Hope you like this script, any bugs please tell me and I will get to work fixing them
Reply
#2

Sounds good.
Waiting for video..
Reply
#3

Wonderful though i didn't check it yet lol
Reply
#4

Are you talking about that mystical phenomenon known as "floating"?
Reply
#5

Quote:
Originally Posted by Y_Less
View Post
Are you talking about that mystical phenomenon known as "floating"?
Yeah that one! It just annoyed me a lot, I'd rather do this than have it realistic and get me stuck on ceilings!
Reply
#6

Isn't that better if you check gSwimmingDown in OnPlayerUpdate first then if is that true checking the animation index? I think it optimize a bit the performance, specially if you have more code in OnPlayerUpdate....Nice job though
Reply
#7

Good point! I did the animation check first then wrote the code for the camera angle checking so that explains why I didn't realise that at first, I'll change it now.
Reply
#8

Great job, I will defiantly use this
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)