Skip to content

Commit

Permalink
Merge pull request #5 from Vladisvell/mesons
Browse files Browse the repository at this point in the history
  • Loading branch information
aeternaclose authored Dec 28, 2023
2 parents f3ca033 + 9aab0de commit c63f8df
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
9 changes: 9 additions & 0 deletions code/game/atoms_movable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@

/atom/movable/proc/forceMove(atom/destination)
var/turf/old_loc = loc
var/area/old_area = get_area(src)
loc = destination
moving_diagonally = 0

Expand All @@ -294,12 +295,20 @@
for(var/atom/movable/AM in old_loc)
AM.Uncrossed(src)

if(old_area)
old_area.Exited(src)

if(destination)
destination.Entered(src)
var/area/new_area = get_area(destination)
for(var/atom/movable/AM in destination)
if(AM == src)
continue
AM.Crossed(src, old_loc)

if(new_area && (old_area != new_area))
new_area.Entered(src)

var/turf/oldturf = get_turf(old_loc)
var/turf/destturf = get_turf(destination)
var/old_z = (oldturf ? oldturf.z : null)
Expand Down
7 changes: 1 addition & 6 deletions code/modules/awaymissions/gateway.dm
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,6 @@ GLOBAL_DATUM_INIT(the_gateway, /obj/machinery/gateway/centerstation, null)
var/obj/effect/landmark/dest = pick(GLOB.awaydestinations)
if(dest)
moving_atom.forceMove(dest.loc)
var/area/entry_area = get_area(dest)
entry_area.Entered(moving_atom)
moving_atom.dir = SOUTH
use_power(5000)
return
Expand Down Expand Up @@ -277,10 +275,7 @@ GLOBAL_DATUM_INIT(the_gateway, /obj/machinery/gateway/centerstation, null)
if(exilecheck(L))
atom_say("Rejecting [moving_atom]: Exile implant detected in close proximity lifeform.")
return
var/turf/destination = get_step(stationgate.loc, SOUTH)
moving_atom.forceMove(destination)
var/area/entry_area = get_area(destination)
entry_area.Entered(moving_atom)
moving_atom.forceMove(get_step(stationgate.loc, SOUTH))
moving_atom.setDir(SOUTH)
if(ismob(moving_atom))
var/mob/M = moving_atom
Expand Down

0 comments on commit c63f8df

Please sign in to comment.