Skip to content

Commit

Permalink
Clowncar exploit fix (#43237)
Browse files Browse the repository at this point in the history
Fixed an exploit allowing you to grab people from anywhere with a clowncar.
  • Loading branch information
ShizCalev authored and SpaceManiac committed Mar 22, 2019
1 parent 25df40f commit 896236f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion code/modules/vehicles/cars/car.dm
Expand Up @@ -78,11 +78,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>")
Expand Down

0 comments on commit 896236f

Please sign in to comment.