mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 19:52:40 +00:00
Fixes symmetry scaling side views and runtime spam with sloshy footsteps (#6998)
Co-authored-by: Raeschen <rycoop29@gmail.com>
This commit is contained in:
@@ -124,7 +124,7 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
|
|||||||
//Do any species specific layering updates, such as when hiding.
|
//Do any species specific layering updates, such as when hiding.
|
||||||
update_icon_special()
|
update_icon_special()
|
||||||
|
|
||||||
/mob/living/carbon/human/update_transform()
|
/mob/living/carbon/human/update_transform(var/instant = FALSE) //CHOMPEdit
|
||||||
/* VOREStation Edit START
|
/* VOREStation Edit START
|
||||||
// First, get the correct size.
|
// First, get the correct size.
|
||||||
var/desired_scale_x = icon_scale_x
|
var/desired_scale_x = icon_scale_x
|
||||||
@@ -143,9 +143,9 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
|
|||||||
var/desired_scale_y = size_multiplier * icon_scale_y
|
var/desired_scale_y = size_multiplier * icon_scale_y
|
||||||
desired_scale_x *= species.icon_scale_x
|
desired_scale_x *= species.icon_scale_x
|
||||||
desired_scale_y *= species.icon_scale_y
|
desired_scale_y *= species.icon_scale_y
|
||||||
center_offset = species.center_offset //CHOMPEdit
|
var/cent_offset = species.center_offset //CHOMPEdit
|
||||||
if(offset_override) //CHOMPEdit
|
if(fuzzy || offset_override || dir == EAST || dir == WEST) //CHOMPEdit
|
||||||
center_offset = 0 //CHOMPEdit
|
cent_offset = 0 //CHOMPEdit
|
||||||
vis_height = species.icon_height
|
vis_height = species.icon_height
|
||||||
appearance_flags |= PIXEL_SCALE
|
appearance_flags |= PIXEL_SCALE
|
||||||
if(fuzzy)
|
if(fuzzy)
|
||||||
@@ -177,17 +177,20 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
|
|||||||
else
|
else
|
||||||
M.Translate(1,-6)
|
M.Translate(1,-6)
|
||||||
M.Scale(desired_scale_y, desired_scale_x)
|
M.Scale(desired_scale_y, desired_scale_x)
|
||||||
M.Translate(center_offset * desired_scale_x, (vis_height/2)*(desired_scale_y-1)) //CHOMPEdit
|
M.Translate(cent_offset * desired_scale_x, (vis_height/2)*(desired_scale_y-1)) //CHOMPEdit
|
||||||
// CHOMPEdit End
|
// CHOMPEdit End
|
||||||
layer = MOB_LAYER -0.01 // Fix for a byond bug where turf entry order no longer matters
|
layer = MOB_LAYER -0.01 // Fix for a byond bug where turf entry order no longer matters
|
||||||
else
|
else
|
||||||
M.Scale(desired_scale_x, desired_scale_y)//VOREStation Edit
|
M.Scale(desired_scale_x, desired_scale_y)//VOREStation Edit
|
||||||
M.Translate(center_offset * desired_scale_x, (vis_height/2)*(desired_scale_y-1)) //CHOMPEdit
|
M.Translate(cent_offset * desired_scale_x, (vis_height/2)*(desired_scale_y-1)) //CHOMPEdit
|
||||||
if(tail_style?.can_loaf) // VOREStation Edit: Taur Loafing
|
if(tail_style?.can_loaf) // VOREStation Edit: Taur Loafing
|
||||||
update_tail_showing() // VOREStation Edit: Taur Loafing
|
update_tail_showing() // VOREStation Edit: Taur Loafing
|
||||||
layer = MOB_LAYER // Fix for a byond bug where turf entry order no longer matters
|
layer = MOB_LAYER // Fix for a byond bug where turf entry order no longer matters
|
||||||
|
|
||||||
animate(src, transform = M, time = anim_time)
|
if(instant) //CHOMPEdit Start
|
||||||
|
transform = M
|
||||||
|
else
|
||||||
|
animate(src, transform = M, time = anim_time) //CHOMPEdit End
|
||||||
update_icon_special() //May contain transform-altering things
|
update_icon_special() //May contain transform-altering things
|
||||||
|
|
||||||
//DAMAGE OVERLAYS
|
//DAMAGE OVERLAYS
|
||||||
|
|||||||
@@ -1035,17 +1035,17 @@
|
|||||||
if(!isnull(M.icon_scale_y_percent))
|
if(!isnull(M.icon_scale_y_percent))
|
||||||
. *= M.icon_scale_y_percent
|
. *= M.icon_scale_y_percent
|
||||||
|
|
||||||
/mob/living/update_transform()
|
/mob/living/update_transform(var/instant = FALSE) //CHOMPEdit
|
||||||
// First, get the correct size.
|
// First, get the correct size.
|
||||||
var/desired_scale_x = size_multiplier * icon_scale_x //VOREStation edit
|
var/desired_scale_x = size_multiplier * icon_scale_x //VOREStation edit
|
||||||
var/desired_scale_y = size_multiplier * icon_scale_y //VOREStation edit
|
var/desired_scale_y = size_multiplier * icon_scale_y //VOREStation edit
|
||||||
|
var/cent_offset = center_offset //CHOMPEdit
|
||||||
// Now for the regular stuff.
|
// Now for the regular stuff.
|
||||||
if(offset_override) //CHOMPEdit
|
if(fuzzy || offset_override || dir == EAST || dir == WEST) //CHOMPEdit
|
||||||
center_offset = 0 //CHOMPEdit
|
cent_offset = 0 //CHOMPEdit
|
||||||
var/matrix/M = matrix()
|
var/matrix/M = matrix()
|
||||||
M.Scale(desired_scale_x, desired_scale_y)
|
M.Scale(desired_scale_x, desired_scale_y)
|
||||||
M.Translate(center_offset * desired_scale_x, (vis_height/2)*(desired_scale_y-1)) //CHOMPEdit
|
M.Translate(cent_offset * desired_scale_x, (vis_height/2)*(desired_scale_y-1)) //CHOMPEdit
|
||||||
src.transform = M //VOREStation edit
|
src.transform = M //VOREStation edit
|
||||||
handle_status_indicators()
|
handle_status_indicators()
|
||||||
|
|
||||||
|
|||||||
@@ -364,7 +364,7 @@
|
|||||||
thing.enter_belly(src) // Atom movable proc, does nothing by default. Overridden in children for special behavior.
|
thing.enter_belly(src) // Atom movable proc, does nothing by default. Overridden in children for special behavior.
|
||||||
if(owner && istype(owner.loc,/turf/simulated) && !cycle_sloshed && reagents.total_volume > 0)
|
if(owner && istype(owner.loc,/turf/simulated) && !cycle_sloshed && reagents.total_volume > 0)
|
||||||
var/turf/simulated/T = owner.loc
|
var/turf/simulated/T = owner.loc
|
||||||
var/S = pick(T.vorefootstep_sounds["human"])
|
var/S = pick(T.base_vorefootstep_sounds["human"]) //ChompEDIT
|
||||||
if(S)
|
if(S)
|
||||||
playsound(T, S, sound_volume * (reagents.total_volume / 100), FALSE, preference = /datum/client_preference/digestion_noises)
|
playsound(T, S, sound_volume * (reagents.total_volume / 100), FALSE, preference = /datum/client_preference/digestion_noises)
|
||||||
cycle_sloshed = TRUE
|
cycle_sloshed = TRUE
|
||||||
|
|||||||
@@ -30,11 +30,12 @@
|
|||||||
/mob/living/update_icons()
|
/mob/living/update_icons()
|
||||||
. = ..()
|
. = ..()
|
||||||
ASSERT(!ishuman(src))
|
ASSERT(!ishuman(src))
|
||||||
if(fuzzy || offset_override) //CHOMPEdit
|
var/cent_offset = center_offset //ChompEDIT
|
||||||
center_offset = 0 //CHOMPEdit
|
if(fuzzy || offset_override || dir == EAST || dir == WEST) //CHOMPEdit
|
||||||
|
cent_offset = 0 //CHOMPEdit
|
||||||
var/matrix/M = matrix()
|
var/matrix/M = matrix()
|
||||||
M.Scale(size_multiplier * icon_scale_x, size_multiplier * icon_scale_y)
|
M.Scale(size_multiplier * icon_scale_x, size_multiplier * icon_scale_y)
|
||||||
M.Translate(center_offset * size_multiplier * icon_scale_x, (vis_height/2)*(size_multiplier-1)) //CHOMPEdit
|
M.Translate(cent_offset * size_multiplier * icon_scale_x, (vis_height/2)*(size_multiplier-1)) //CHOMPEdit
|
||||||
transform = M
|
transform = M
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -186,3 +186,8 @@ Maybe later, gotta figure out a way to click yourself when in a locker etc.
|
|||||||
return
|
return
|
||||||
else
|
else
|
||||||
transform_into_mob(tf_form, TRUE, TRUE, TRUE)
|
transform_into_mob(tf_form, TRUE, TRUE, TRUE)
|
||||||
|
|
||||||
|
/mob/living/set_dir(var/new_dir)
|
||||||
|
. = ..()
|
||||||
|
if(size_multiplier != 1 || icon_scale_x != 1 && center_offset > 0)
|
||||||
|
update_transform(TRUE)
|
||||||
Reference in New Issue
Block a user