Fixes molotovs not working when hitting anything except a floor (#16372)

This commit is contained in:
Unknown-as-Captain
2017-11-01 09:20:35 +02:00
committed by Pieter-Jan Briers
parent 874c5bcb8f
commit cc98a6d1a9

View File

@@ -1250,7 +1250,9 @@
src.visible_message("<span class='warning'>The [smashtext][src.name] shatters!</span>","<span class='warning'>You hear a shatter!</span>")
playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
if(reagents.total_volume)
src.reagents.reaction(hit_atom, TOUCH) //maybe this could be improved?
src.reagents.reaction(get_turf(src), TOUCH) //splat the floor AND the thing we hit, otherwise fuel wouldn't ignite when hitting anything that wasn't a floor
if(hit_atom != get_turf(src)) //prevent spilling on the floor twice though
src.reagents.reaction(hit_atom, TOUCH) //maybe this could be improved?
spawn(5) src.reagents.clear_reagents() //maybe this could be improved?
invisibility = INVISIBILITY_MAXIMUM //so it stays a while to ignite any fuel