Revert "It Just Works (#26371)" (#26391)

This reverts commit b3cbc1cbbc.
This commit is contained in:
ShiftyRail
2020-05-04 21:27:34 +02:00
committed by GitHub
parent b3cbc1cbbc
commit 5ffa4a488b
4 changed files with 0 additions and 82 deletions

View File

@@ -59,8 +59,6 @@
var/list/datum/tracker/trackers = list()
var/list/client/contained_clients
/atom/movable/New()
. = ..()
if((flags & HEAR) && !ismob(src))
@@ -180,7 +178,6 @@
var/atom/oldloc = loc
if((bound_height != WORLD_ICON_SIZE || bound_width != WORLD_ICON_SIZE) && (loc == NewLoc))
. = ..()
animate_glide(Dir, .)
update_dir()
return
@@ -189,12 +186,6 @@
if(Dir || (loc != NewLoc))
if (!(Dir & (Dir - 1))) //Cardinal move
. = ..()
if(.)
if(Dir)
animate_glide(Dir, .)
else if(get_dist(oldloc, NewLoc) == 1) //This isn't technically a step, but if it's still only one tile we want to animate it
animate_glide(get_dir(oldloc, NewLoc), .)
else //Diagonal move, split it into cardinal moves
if (Dir & NORTH)
if (Dir & EAST) //Northeast
@@ -250,35 +241,6 @@
// Update on_moved listeners.
INVOKE_EVENT(on_moved,list("loc"=NewLoc))
/atom/movable/proc/animate_glide(Dir, dist)
if(!animate_movement)
return
var/const/FUDGE_ANIM = 0.1 //For unknown reasons, movement is all janky unless the animation is set to be slightly longer than it should have to be. This value is added to the animation duration.
#define GLIDE_HELPER(O, axis, val) O.axis -= val; animate(O, axis = val, world.tick_lag * WORLD_ICON_SIZE / (glide_size || 4) + FUDGE_ANIM, flags = ANIMATION_PARALLEL | ANIMATION_RELATIVE)
if(Dir & NORTH)
GLIDE_HELPER(src, pixel_y, dist)
else if(Dir & SOUTH)
GLIDE_HELPER(src, pixel_y, -dist)
if(Dir & EAST)
GLIDE_HELPER(src, pixel_x, dist)
else if(Dir & WEST)
GLIDE_HELPER(src, pixel_x, -dist)
if(contained_clients)
for(var/client/C in contained_clients)
if(Dir & NORTH)
GLIDE_HELPER(C, pixel_y, dist)
else if(Dir & SOUTH)
GLIDE_HELPER(C, pixel_y, -dist)
if(Dir & EAST)
GLIDE_HELPER(C, pixel_x, dist)
if(Dir & WEST)
GLIDE_HELPER(C, pixel_x, -dist)
#undef GLIDE_HELPER
/atom/movable/search_contents_for(path,list/filter_path=null) // For vehicles
var/list/found = ..()
for (var/atom/A in locked_atoms)
@@ -432,34 +394,6 @@
/atom/movable/Crossed(atom/movable/AM)
return
/atom/movable/proc/add_client(client/C)
if(!contained_clients)
contained_clients = list()
contained_clients += C
var/atom/movable/L = loc
if(istype(L))
L.add_client(C)
/atom/movable/proc/remove_client(client/C)
contained_clients -= C
if(!contained_clients.len)
contained_clients = null
var/atom/movable/L = loc
if(istype(L))
L.remove_client(C)
/atom/movable/Entered(atom/movable/AM)
if(AM.contained_clients)
for(var/client/C in AM.contained_clients)
add_client(C)
/atom/movable/Exited(atom/movable/AM)
if(AM.contained_clients)
for(var/client/C in AM.contained_clients)
remove_client(C)
/atom/movable/to_bump(atom/Obstacle)
if(src.throwing)
src.throw_impact(Obstacle)
@@ -492,8 +426,6 @@
for(var/atom/movable/AM in loc)
AM.Crossed(src,no_tp)
if(get_dist(old_loc, loc) == 1)
animate_glide(get_dir(old_loc, loc), WORLD_ICON_SIZE)
for(var/atom/movable/AM in locked_atoms)
var/datum/locking_category/category = locked_atoms[AM]
@@ -537,9 +469,6 @@
var/area/A = get_area(destination)
A.Entered(src)
if(get_dist(old_loc, destination) == 1)
animate_glide(get_dir(old_loc, destination), WORLD_ICON_SIZE)
for(var/atom/movable/AM in locked_atoms)
AM.forceMove(loc)

View File

@@ -118,6 +118,3 @@
if(client)
client.CAN_MOVE_DIAGONALLY = 0
add_client(client)
contained_clients.Swap(1, contained_clients.len) //Put our own client at the beginning so we know which one to remove in Logout() (as client is already nulled by then)

View File

@@ -48,7 +48,4 @@
INVOKE_EVENT(on_logout, list())
if(contained_clients)
remove_client(contained_clients[1])
..()

View File

@@ -156,11 +156,6 @@ var/savefile/panicfile
process_adminbus_teleport_locs() //Sets up adminbus teleport locations.
SortAreas() //Build the list of all existing areas and sort it alphabetically
//The following block serves to force the server to use pixel movement even though everything is tile-aligned. If you know of a better way to do this, please replace this with it.
var/obj/forcepixel = new()
forcepixel.step_x = 1
qdel(forcepixel)
spawn(2000) //so we aren't adding to the round-start lag
if(config.ToRban)
ToRban_autoupdate()