JonnyBro / beatrun

Fork of infamous parkour addon for Garry's Mod
https://beatrun.jonnybro.ru
Do What The F*ck You Want To Public License
240 stars 40 forks source link

Player speed bug when holding any weapon except beatrun hands swep #185

Closed RedeJot closed 5 months ago

RedeJot commented 5 months ago

So when I installed beatrun first time, nothing happend, everything worked perfectly with any gun mod etc, but recently the speed bug happend, only occurs with different weapons execpt the beatrun hands swep, It happend when I was changing speed limit setting in beatrun gamemode, I've set this to a much higher value when I was fooling around on large map, now with the default value when equipping any other weapon, the speed immediately goes to 22 km/h when going sideways and backwards, when going forwards also goes to 22km/h but when I swing camera fast horizontally, it's deaccelerating like normal. When I have equipped beatrun hands it works everything as should be, going 10 km/h sideways and backwards, but with any other weapon even hl2 weapons it's bugged.

Here is video to proof and screenshot of setting that I changed and it's bugged. Reseting gmod to default options, reinstalling gmod and deleting and installing beatrun again doesn't solve the issue. Even deleting every mod from gmod doesn't solve this. https://youtu.be/P20zJQDjWDk

Steps to reproduce the behavior:

  1. Enter spawn menu.
  2. On the right side beatrun bookmark.
  3. Under Server setting click moves.
  4. Change Speed limit bar to any value and change it back to default value.
  5. Try to spawn different weapon and try to move.

Additional information:

20240506190536_1

JonnyBro commented 5 months ago

This is how it was indended by the original creator. I assume that this was done so that you can quickly move with weapons for more dynamic fights.

RedeJot commented 5 months ago

I don't know, but before changing this speed limit with any weapon I needed to press sprint button to sprint, now it's like the sprint button is pressed always, and it's not accelerating like gradually, it's instant speed and this destroy immersion, I like this movement mod it's make maps with fights more fun, now it's like I'm turned on some speed hack xd

JonnyBro commented 5 months ago

I'll see what I can do about that

RedeJot commented 5 months ago

So, I've checked the code of FreerunSysAll.lua and I finded: if ply:notUsingRH() then weaponspeed = speed_limit:GetInt() end

And for little test I gave to the end "weaponspeed = speed_limit:GetInt() - 100" and now when holding weapons it is now going 15km/h and when i sprint it's accelerating to 22km/h gradually and now walking without pressed shift going sideways backwards i'm going 15km/h not 22km/h like before.

Edit* Now substracting from "weaponspeed = speed_limit:GetInt() - 180" the jogging speed with any weapon is like when holding beatrun hands when going sideways and backwards it's now 10km/h like normally when it was working that first time when I installed the mod.

JonnyBro commented 5 months ago

I will not be at home for a couple of days, will make a proper fix when I'm at home

JonnyBro commented 5 months ago

@RedeJot Done! Now weapon speed scales with the Speed Limit variable properly. Sorry with the delay, I was busy with living =)