pac3 icon indicating copy to clipboard operation
pac3 copied to clipboard

Shake Part range is global

Open Logzombie opened this issue 4 years ago • 3 comments

This has been a bug for ages, or so I assume. The range of the shake part I imagine is supposed to cap how far or when the shake part's effective area is supposed to drop off(?)

To say the least, even on a range as low as 0.1, the shake is still map-wide. I've been very dissuaded from even attempting to use them as the only way to do so without annoying literally everybody on the server is to cap it with a complex proxy set up. Ideally we shouldn't need very specific workarounds just to prevent a bug caused by a lack of functionality on a part. This isn't convenient to use in the slightest. Overall, will be useful to have this fixed since this bug has been there for ages and I haven't spotted an open issue on it. So, thought I would bring light to it once again.

Logzombie avatar Dec 09 '21 02:12 Logzombie

This is the code. I'm guessing self:GetDrawPosition() is returning the local player's position in the case the owner isn't valid or something like that.

https://github.com/CapsAdmin/pac3/blob/master/lua/pac3/core/client/parts/shake.lua#L17

thegrb93 avatar Dec 09 '21 02:12 thegrb93

Nvm, looking at the gmod wiki, https://wiki.facepunch.com/gmod/util.ScreenShake , the position and radius don't even do anything on client. Probably be best just to make it only work for the owner.

thegrb93 avatar Dec 09 '21 02:12 thegrb93

Yeah, should be easy to make shaking only show for the owner. Need to remember to add a comment explaining why.

thegrb93 avatar Dec 09 '21 02:12 thegrb93