mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 03:33:21 +00:00
Merge pull request #9703 from VOREStation/Verkister-patch-8
Fixes animated resize not updating shape
This commit is contained in:
committed by
Chompstation Bot
parent
5fc9a7b4ba
commit
536648e13f
@@ -70,7 +70,14 @@ var/const/RESIZE_A_SMALLTINY = (RESIZE_SMALL + RESIZE_TINY) / 2
|
|||||||
var/change = new_size - size_multiplier
|
var/change = new_size - size_multiplier
|
||||||
var/duration = (abs(change)+0.25) SECONDS
|
var/duration = (abs(change)+0.25) SECONDS
|
||||||
var/matrix/resize = matrix() // Defines the matrix to change the player's size
|
var/matrix/resize = matrix() // Defines the matrix to change the player's size
|
||||||
resize.Scale(new_size * icon_scale_x, new_size * icon_scale_y) //Change the size of the matrix
|
var/special_x = 1
|
||||||
|
var/special_y = 1
|
||||||
|
if(ishuman(src))
|
||||||
|
var/mob/living/carbon/human/H = src
|
||||||
|
var/datum/species/S = H.species
|
||||||
|
special_x = S.icon_scale_x
|
||||||
|
special_y = S.icon_scale_y
|
||||||
|
resize.Scale(new_size * icon_scale_x * special_x, new_size * icon_scale_y * special_y) //Change the size of the matrix
|
||||||
resize.Translate(0, (vis_height/2) * (new_size - 1)) //Move the player up in the tile so their feet align with the bottom
|
resize.Translate(0, (vis_height/2) * (new_size - 1)) //Move the player up in the tile so their feet align with the bottom
|
||||||
animate(src, transform = resize, time = duration) //Animate the player resizing
|
animate(src, transform = resize, time = duration) //Animate the player resizing
|
||||||
|
|
||||||
@@ -338,4 +345,4 @@ var/const/RESIZE_A_SMALLTINY = (RESIZE_SMALL + RESIZE_TINY) / 2
|
|||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
#undef STEP_TEXT_OWNER
|
#undef STEP_TEXT_OWNER
|
||||||
#undef STEP_TEXT_PREY
|
#undef STEP_TEXT_PREY
|
||||||
|
|||||||
Reference in New Issue
Block a user