diff --git a/code/modules/mob/living/basic/space_fauna/carp/carp_abilities.dm b/code/modules/mob/living/basic/space_fauna/carp/carp_abilities.dm index 12588886105..b2fcbf0f78d 100644 --- a/code/modules/mob/living/basic/space_fauna/carp/carp_abilities.dm +++ b/code/modules/mob/living/basic/space_fauna/carp/carp_abilities.dm @@ -137,6 +137,7 @@ if (isliving(entered_atom)) var/mob/living/teleported_mob = entered_atom teleported_mob.changeNext_move(disorient_time) + teleported_mob.ai_controller?.CancelActions() var/turf/destination = pick(exit_locs) do_teleport(entered_atom, destination, channel = TELEPORT_CHANNEL_MAGIC) diff --git a/code/modules/mob/living/basic/space_fauna/carp/carp_ai_rift_actions.dm b/code/modules/mob/living/basic/space_fauna/carp/carp_ai_rift_actions.dm index 260dce64bdc..69890c7bb2f 100644 --- a/code/modules/mob/living/basic/space_fauna/carp/carp_ai_rift_actions.dm +++ b/code/modules/mob/living/basic/space_fauna/carp/carp_ai_rift_actions.dm @@ -201,7 +201,7 @@ if (!exit_count) continue var/turf/rift_exit = rift.exit_locs[exit_count] - if (get_dist(rift_exit, target) >= distance_to_target) + if ((get_dist(rift_exit, target) + get_dist(rift, target)) >= distance_to_target) continue - controller.queue_behavior(/datum/ai_behavior/travel_towards_atom, get_turf(rift)) + controller.queue_behavior(/datum/ai_behavior/travel_towards_atom, rift) return SUBTREE_RETURN_FINISH_PLANNING