Simple animal animations (#9393)

This commit is contained in:
Chada-1
2020-07-22 18:49:36 +02:00
committed by GitHub
parent 9b99beef9f
commit 8c14469018
6 changed files with 41 additions and 14 deletions
@@ -86,20 +86,6 @@
return ..()
//Pixel offsetting as they scamper around
/mob/living/simple_animal/rat/Move()
if(..())
if (prob(50))
var/new_pixelx = pixel_x
new_pixelx += rand(-2,2)
new_pixelx = Clamp(new_pixelx, -10, 10)
animate(src, pixel_x = new_pixelx, time = 0.5)
else
var/new_pixely = pixel_y
new_pixely += rand(-2,2)
new_pixely = Clamp(new_pixely, -4, 14)
animate(src, pixel_y = new_pixely, time = 0.5)
/mob/living/simple_animal/rat/Initialize()
. = ..()