Merge pull request #9290 from AnturK/giant_enemy_crab

Adds resize variable for mobs
This commit is contained in:
Jordie
2015-05-09 20:29:55 +10:00
4 changed files with 22 additions and 2 deletions
@@ -20,6 +20,10 @@
final_dir = pick(NORTH, SOUTH) //So you fall on your side rather than your face or ass
lying_prev = lying //so we don't try to animate until there's been another change.
if(resize != RESIZE_DEFAULT_SIZE)
changed++
ntransform.Scale(resize)
resize = RESIZE_DEFAULT_SIZE
if(changed)
animate(src, transform = ntransform, time = 2, pixel_y = final_pixel_y, dir = final_dir, easing = EASE_IN|EASE_OUT)
@@ -488,4 +488,17 @@
canmove = 0
else
canmove = 1
update_transform()
return canmove
/mob/living/simple_animal/update_transform()
var/matrix/ntransform = matrix(transform) //aka transform.Copy()
var/changed = 0
if(resize != RESIZE_DEFAULT_SIZE)
changed++
ntransform.Scale(resize)
resize = RESIZE_DEFAULT_SIZE
if(changed)
animate(src, transform = ntransform, time = 2, easing = EASE_IN|EASE_OUT)
+3 -1
View File
@@ -152,4 +152,6 @@
var/turf/listed_turf = null //the current turf being examined in the stat panel
var/list/permanent_huds = list()
var/permanent_sight_flags = 0
var/permanent_sight_flags = 0
var/resize = 1 //Badminnery resize