mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user