Implements turret trajectory prediction

- Adds trajectory checking for turrets, so they don't burn holes through other objects (like walls and AI's) if they wouldn't hit them anyway.
This commit is contained in:
Loganbacca
2015-07-10 15:17:53 +12:00
parent a32b712bae
commit 6b10b648d2
2 changed files with 9 additions and 6 deletions

View File

@@ -605,8 +605,12 @@ var/list/turret_icons
if(!raised) //the turret has to be raised in order to fire - makes sense, right?
return
update_icon()
//targeting check, can we hit them?
if(!check_trajectory(target, src))
return
var/obj/item/projectile/A
if(emagged || lethal)
A = new eprojectile(loc)