mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 05:27:01 +01:00
Fixes Universal Damage Issues. Implements Proper Ricochets (#12532)
This commit is contained in:
committed by
variableundefined
parent
57298cb79f
commit
f4451fcb3d
@@ -57,7 +57,7 @@
|
||||
var/impact_effect_type //what type of impact effect to show when hitting something
|
||||
var/ricochets = 0
|
||||
var/ricochets_max = 2
|
||||
var/ricochet_chance = 0
|
||||
var/ricochet_chance = 30
|
||||
|
||||
var/log_override = FALSE //whether print to admin attack logs or just keep it in the diary
|
||||
|
||||
@@ -185,13 +185,13 @@
|
||||
|
||||
if(check_ricochet(A) && check_ricochet_flag(A) && ricochets < ricochets_max)
|
||||
ricochets++
|
||||
if(A.handle_ricochet(src))
|
||||
on_ricochet(A)
|
||||
ignore_source_check = TRUE
|
||||
range = initial(range)
|
||||
return TRUE
|
||||
if(firer)
|
||||
if(A == firer || (A == firer.loc && istype(A, /obj/mecha))) //cannot shoot yourself or your mech
|
||||
if(A.handle_ricochet(src))
|
||||
on_ricochet(A)
|
||||
ignore_source_check = TRUE
|
||||
range = initial(range)
|
||||
return TRUE
|
||||
if(firer && !ignore_source_check)
|
||||
if(A == firer || (A == firer.loc && ismecha(A))) //cannot shoot yourself or your mech
|
||||
loc = A.loc
|
||||
return 0
|
||||
|
||||
@@ -325,7 +325,7 @@ obj/item/projectile/Crossed(atom/movable/AM, oldloc) //A mob moving on a tile wi
|
||||
return FALSE
|
||||
|
||||
/obj/item/projectile/proc/check_ricochet_flag(atom/A)
|
||||
if(A.flags_2 & CHECK_RICOCHET_1)
|
||||
if(A.flags_2 & CHECK_RICOCHET_2)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user