From 85871da5c9249b208b079d7b0145973a7645d577 Mon Sep 17 00:00:00 2001 From: AnturK Date: Mon, 10 Jun 2019 11:19:47 +0200 Subject: [PATCH] Fixes ghost seizures. --- code/__HELPERS/matrices.dm | 7 +++++-- code/datums/components/orbiter.dm | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/code/__HELPERS/matrices.dm b/code/__HELPERS/matrices.dm index 9f07ed53117..306bffc5a15 100644 --- a/code/__HELPERS/matrices.dm +++ b/code/__HELPERS/matrices.dm @@ -2,7 +2,7 @@ . = new_angle - old_angle Turn(.) //BYOND handles cases such as -270, 360, 540 etc. DOES NOT HANDLE 180 TURNS WELL, THEY TWEEN AND LOOK LIKE SHIT -/atom/proc/SpinAnimation(speed = 10, loops = -1, clockwise = 1, segments = 3) +/atom/proc/SpinAnimation(speed = 10, loops = -1, clockwise = 1, segments = 3, parallel = TRUE) if(!segments) return var/segment = 360/segments @@ -18,7 +18,10 @@ speed /= segments - animate(src, transform = matrices[1], time = speed, loops , flags = ANIMATION_PARALLEL) + if(parallel) + animate(src, transform = matrices[1], time = speed, loops , flags = ANIMATION_PARALLEL) + else + animate(src, transform = matrices[1], time = speed, loops) for(var/i in 2 to segments) //2 because 1 is covered above animate(transform = matrices[i], time = speed) //doesn't have an object argument because this is "Stacking" with the animate call above diff --git a/code/datums/components/orbiter.dm b/code/datums/components/orbiter.dm index b3de6f863fb..ff07103e882 100644 --- a/code/datums/components/orbiter.dm +++ b/code/datums/components/orbiter.dm @@ -81,7 +81,7 @@ shift.Translate(0, radius) orbiter.transform = shift - orbiter.SpinAnimation(rotation_speed, -1, clockwise, rotation_segments) + orbiter.SpinAnimation(rotation_speed, -1, clockwise, rotation_segments, parallel = FALSE) //we stack the orbits up client side, so we can assign this back to normal server side without it breaking the orbit orbiter.transform = initial_transform