it works
This commit is contained in:
@@ -250,7 +250,20 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
|
||||
animate(pixel_x=rand(min,max), pixel_y=rand(min,max), time=1)
|
||||
animate(pixel_x=oldx, pixel_y=oldy, time=1)
|
||||
|
||||
/proc/directional_recoil(mob/M, strength=1, angle = 0)
|
||||
if(!M || !M.client)
|
||||
return
|
||||
var/client/C = M.client
|
||||
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)
|
||||
|
||||
/proc/findname(msg)
|
||||
if(!istext(msg))
|
||||
|
||||
Reference in New Issue
Block a user