Fixes exploit (#25101)

This commit is contained in:
Mikhail Dzianishchyts
2024-04-22 22:04:38 +00:00
committed by GitHub
parent 7fa44a31fb
commit 2cfa9d620f
6 changed files with 34 additions and 21 deletions
+11 -10
View File
@@ -23,9 +23,7 @@
effect_in = effect
if(isnull(effect_out))
effect_out = effect
if(D.start(atom_to_teleport, destination, variance_range, force_teleport, effect_in, effect_out, sound_in, sound_out, bypass_area_flag, safe_turf_pick, do_effect))
return TRUE
return FALSE
return D.start(atom_to_teleport, destination, variance_range, force_teleport, effect_in, effect_out, sound_in, sound_out, bypass_area_flag, safe_turf_pick, do_effect)
/datum/teleport
var/atom/movable/teleatom //atom to teleport
@@ -166,6 +164,16 @@
playSpecials(curturf,effectin,soundin)
if(isliving(teleatom))
var/mob/living/target_mob = teleatom
if(target_mob.buckled)
target_mob.buckled.unbuckle_mob(target_mob, force = TRUE)
if(target_mob.has_buckled_mobs())
target_mob.unbuckle_all_mobs(force = TRUE)
if(ismachinery(target_mob.loc) || istype(target_mob.loc, /obj/item/mecha_parts/mecha_equipment/medical/sleeper))
var/obj/location = target_mob.loc
location.force_eject_occupant(target_mob)
if(force_teleport)
teleatom.forceMove(destturf)
playSpecials(destturf,effectout,soundout)
@@ -173,13 +181,6 @@
if(teleatom.Move(destturf))
playSpecials(destturf,effectout,soundout)
if(isliving(teleatom))
var/mob/living/L = teleatom
if(L.buckled)
L.buckled.unbuckle_mob(L, force = TRUE)
if(L.has_buckled_mobs())
L.unbuckle_all_mobs(force = TRUE)
destarea.Entered(teleatom)
return TRUE