Merge pull request #4263 from Tastyfish/smooth-shuttles

Fixes shuttle smoothing
This commit is contained in:
Fox McCloud
2016-04-21 22:58:49 -04:00
4 changed files with 29 additions and 11 deletions
+11 -5
View File
@@ -89,12 +89,18 @@
health = 160
reinf = 1
New()
..()
color = null
/obj/structure/window/full/shuttle/New()
..()
color = null
update_icon() //icon_state has to be set manually
return
/obj/structure/window/full/shuttle/update_icon() //icon_state has to be set manually
return
/obj/structure/window/full/shuttle/shuttleRotate(rotation)
..()
var/matrix/M = transform
M.Turn(rotation)
transform = M
/obj/structure/window/full/shuttle/dark
icon = 'icons/turf/shuttle.dmi'
+6
View File
@@ -2,6 +2,12 @@
name = "shuttle"
icon = 'icons/turf/shuttle.dmi'
/obj/structure/shuttle/shuttleRotate(rotation)
..()
var/matrix/M = transform
M.Turn(rotation)
transform = M
/obj/structure/shuttle/window
name = "shuttle window"
icon = 'icons/obj/podwindows.dmi'
+2 -1
View File
@@ -36,7 +36,8 @@
T.transform = transform
//why don't shuttle walls habe smoothwall? now i gotta do rotation the dirty way
/turf/simulated/shuttle/wall/shuttleRotate(rotation)
/turf/simulated/shuttle/shuttleRotate(rotation)
..()
var/matrix/M = transform
M.Turn(rotation)
transform = M
+10 -5
View File
@@ -302,10 +302,6 @@
//rotate our direction
dir = angle2dir(rotation+dir2angle(dir))
//resmooth if need be.
if(smooth)
smooth_icon(src)
//rotate the pixel offsets too.
if (pixel_x || pixel_y)
if (rotation < 0)
@@ -316,6 +312,9 @@
pixel_x = oldPY
pixel_y = (oldPX*(-1))
/atom/proc/postDock()
if(smooth)
smooth_icon(src)
//this is the main proc. It instantly moves our mobile port to stationary port S1
@@ -368,7 +367,7 @@
var/list/door_unlock_list = list()
for(var/i=1, i<=L0.len, ++i)
for(var/i in 1 to L0.len)
var/turf/T0 = L0[i]
if(!T0)
continue
@@ -443,6 +442,12 @@
T0.CalculateAdjacentTurfs()
air_master.add_to_active(T0,1)
for(var/A1 in L1)
var/turf/T1 = A1
T1.postDock()
for(var/atom/movable/M in T1)
M.postDock()
loc = S1.loc
dir = S1.dir