mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-11 10:22:13 +00:00
client prefs! per-gun recoil multipliers!
This commit is contained in:
@@ -254,16 +254,13 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
|
||||
if(!M || !M.client)
|
||||
return
|
||||
var/client/C = M.client
|
||||
var/client_screenshake = (C.prefs.recoil_screenshake * 0.01)
|
||||
strength *= client_screenshake
|
||||
var/recoil_x = -sin(angle)*4*strength + rand(-strength, strength)
|
||||
var/recoil_y = -cos(angle)*4*strength + rand(-strength, strength)
|
||||
animate(C, pixel_x=recoil_x, pixel_y=recoil_y, time=1, easing=SINE_EASING|EASE_OUT, flags=ANIMATION_PARALLEL|ANIMATION_RELATIVE)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, /proc/recoil_recover, M), 2)
|
||||
|
||||
/proc/recoil_recover(mob/M)
|
||||
if(!M || !M.client)
|
||||
return
|
||||
var/client/C = M.client
|
||||
animate(C, pixel_x=0, pixel_y=0, time=3, easing=SINE_EASING|EASE_IN)
|
||||
animate(pixel_x=0, pixel_y=0, time=3, easing=SINE_EASING|EASE_IN) // according to bhjin this works on more recent byond versions
|
||||
// if you havent updated uuh sucks to be you then
|
||||
|
||||
/proc/findname(msg)
|
||||
if(!istext(msg))
|
||||
|
||||
Reference in New Issue
Block a user