Skip to content

Commit

Permalink
Removes Parallax Animate (ParadiseSS13#17083)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fox-McCloud authored Nov 13, 2021
1 parent 7802581 commit 65f28dc
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions code/_onclick/hud/parallax.dm
Original file line number Diff line number Diff line change
Expand Up @@ -192,17 +192,12 @@
if(L.view_sized != C.view)
L.update_o(C.view)

var/change_x
var/change_y

if(L.absolute)
L.offset_x = -(posobj.x - SSparallax.planet_x_offset) * L.speed
L.offset_y = -(posobj.y - SSparallax.planet_y_offset) * L.speed
else
change_x = offset_x * L.speed
L.offset_x -= change_x
change_y = offset_y * L.speed
L.offset_y -= change_y
L.offset_x -= offset_x * L.speed
L.offset_y -= offset_y * L.speed

if(L.offset_x > 240)
L.offset_x -= 480
Expand All @@ -213,10 +208,6 @@
if(L.offset_y < -240)
L.offset_y += 480

if(!(areaobj.parallax_movedir && areaobj.moving) && C.dont_animate_parallax <= world.time && (offset_x || offset_y) && abs(offset_x) <= max(C.parallax_throttle/world.tick_lag+1,1) && abs(offset_y) <= max(C.parallax_throttle/world.tick_lag+1,1) && (round(abs(change_x)) > 1 || round(abs(change_y)) > 1))
L.transform = matrix(1, 0, offset_x*L.speed, 0, 1, offset_y*L.speed)
animate(L, transform=matrix(), time = last_delay)

L.screen_loc = "CENTER-7:[round(L.offset_x,1)],CENTER-7:[round(L.offset_y,1)]"

/atom/movable/proc/update_parallax_contents()
Expand Down

0 comments on commit 65f28dc

Please sign in to comment.