Merge pull request #14810 from zeroisthebiggay/patch-12

Clowncar exploit fix
This commit is contained in:
silicons
2021-06-09 11:17:17 -07:00
committed by GitHub
+5 -1
View File
@@ -76,11 +76,15 @@
return FALSE
if(occupant_amount() >= max_occupants)
return FALSE
if(do_mob(forcer, get_enter_delay(M), target = src))
var/atom/old_loc = loc
if(do_mob(forcer, M, get_enter_delay(M), extra_checks=CALLBACK(src, /obj/vehicle/sealed/car/proc/is_car_stationary, old_loc)))
mob_forced_enter(M, silent)
return TRUE
return FALSE
/obj/vehicle/sealed/car/proc/is_car_stationary(atom/old_loc)
return (old_loc == loc)
/obj/vehicle/sealed/car/proc/mob_forced_enter(mob/M, silent = FALSE)
if(!silent)
M.visible_message("<span class='warning'>[M] is forced into \the [src]!</span>")