mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Window Corridor Thrown Objects Fix
Thrown objects that cross a tile with non-full windows will no longer hit the window even if it isn't visually obstructing the path.
This commit is contained in:
@@ -108,21 +108,22 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
|
||||
|
||||
return 1
|
||||
|
||||
/obj/structure/window/hitby(AM as mob|obj)
|
||||
..()
|
||||
var/tforce = 0
|
||||
if(isobj(AM))
|
||||
var/obj/item/I = AM
|
||||
tforce = I.throwforce
|
||||
if(reinf) tforce *= 0.25
|
||||
playsound(loc, 'sound/effects/Glasshit.ogg', 100, 1)
|
||||
health = max(0, health - tforce)
|
||||
if(health <= 7 && !reinf)
|
||||
anchored = 0
|
||||
update_nearby_icons()
|
||||
step(src, get_dir(AM, src))
|
||||
if(health <= 0)
|
||||
destroy()
|
||||
/obj/structure/window/hitby(atom/movable/AM)
|
||||
if(!CanPass(AM, get_step(src, AM.dir))) //So thrown objects that cross a tile with non-full windows will no longer hit the window even if it isn't visually obstructing the path.
|
||||
..()
|
||||
var/tforce = 0
|
||||
if(isobj(AM))
|
||||
var/obj/item/I = AM
|
||||
tforce = I.throwforce
|
||||
if(reinf) tforce *= 0.25
|
||||
playsound(loc, 'sound/effects/Glasshit.ogg', 100, 1)
|
||||
health = max(0, health - tforce)
|
||||
if(health <= 7 && !reinf)
|
||||
anchored = 0
|
||||
update_nearby_icons()
|
||||
step(src, get_dir(AM, src))
|
||||
if(health <= 0)
|
||||
destroy()
|
||||
|
||||
|
||||
/obj/structure/window/attack_hand(mob/user as mob)
|
||||
|
||||
Reference in New Issue
Block a user