vehicle headshots (tm)

This commit is contained in:
Hatterhat
2020-08-13 13:29:36 -05:00
parent 0083a16762
commit 82e4f5d2d9
+7
View File
@@ -18,6 +18,7 @@
var/canmove = TRUE
var/emulate_door_bumps = TRUE //when bumping a door try to make occupants bump them to open them.
var/default_driver_move = TRUE //handle driver movement instead of letting something else do it like riding datums.
var/enclosed = FALSE // is the rider protected from bullets? assume no
var/list/autogrant_actions_passenger //plain list of typepaths
var/list/autogrant_actions_controller //assoc list "[bitflag]" = list(typepaths)
var/list/mob/occupant_actions //assoc list mob = list(type = action datum assigned to mob)
@@ -166,3 +167,9 @@
if(trailer && .)
var/dir_to_move = get_dir(trailer.loc, newloc)
step(trailer, dir_to_move)
/obj/vehicle/bullet_act(obj/projectile/Proj) //wrapper
if (!enclosed && occupant && !Proj.force_hit && (Proj.def_zone == BODY_ZONE_HEAD || Proj.def_zone == BODY_ZONE_CHEST)) //allows bullets to hit drivers
occupant.bullet_act(Proj) //i'm sure that ATV will protect you against a dink, idiot
return BULLET_ACT_HIT
. = ..()