throw at mobs laying down
This commit is contained in:
@@ -61,9 +61,10 @@
|
||||
|
||||
/obj/item/melee/baton/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||
..()
|
||||
var/mob/thrown_by = thrownby?.resolve()
|
||||
//Only mob/living types have stun handling
|
||||
if(turned_on && prob(throw_hit_chance) && iscarbon(hit_atom) && thrownby)
|
||||
baton_stun(hit_atom, thrownby, shoving = TRUE)
|
||||
if(turned_on && prob(throw_hit_chance) && iscarbon(hit_atom) && thrown_by)
|
||||
baton_stun(hit_atom, thrown_by, shoving = TRUE)
|
||||
|
||||
/obj/item/melee/baton/loaded //this one starts with a cell pre-installed.
|
||||
preload_cell_type = /obj/item/stock_parts/cell/high/plus
|
||||
@@ -387,8 +388,9 @@
|
||||
/obj/item/melee/baton/boomerang/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||
if(turned_on)
|
||||
var/caught = hit_atom.hitby(src, FALSE, FALSE, throwingdatum=throwingdatum)
|
||||
if(ishuman(hit_atom) && !caught && prob(throw_hit_chance) && thrownby)//if they are a carbon and they didn't catch it
|
||||
baton_stun(hit_atom, thrownby, shoving = TRUE)
|
||||
var/mob/thrown_by = thrownby?.resolve()
|
||||
if(ishuman(hit_atom) && !caught && prob(throw_hit_chance) && thrown_by)//if they are a carbon and they didn't catch it
|
||||
baton_stun(hit_atom, thrown_by, shoving = TRUE)
|
||||
if(thrownby && !caught)
|
||||
throw_back()
|
||||
else
|
||||
@@ -397,8 +399,9 @@
|
||||
/obj/item/melee/baton/boomerang/proc/throw_back()
|
||||
set waitfor = FALSE
|
||||
sleep(1)
|
||||
var/mob/thrown_by = thrownby?.resolve()
|
||||
if(!QDELETED(src))
|
||||
throw_at(thrownby, throw_range+2, throw_speed, null, TRUE)
|
||||
throw_at(thrown_by, throw_range+2, throw_speed, null, TRUE)
|
||||
|
||||
/obj/item/melee/baton/boomerang/update_icon()
|
||||
if(turned_on)
|
||||
|
||||
Reference in New Issue
Block a user