mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 21:19:00 +01:00
Turret fixes
This commit is contained in:
@@ -323,4 +323,18 @@
|
||||
else
|
||||
M = locate() in get_step(src,target)
|
||||
if(istype(M))
|
||||
return 1
|
||||
return 1
|
||||
|
||||
|
||||
/proc/check_trajectory(atom/target as mob, var/mob/living/user as mob, var/pass_flags=PASSTABLE|PASSGLASS|PASSGRILLE, flags=null) //Checks if you can hit them or not.
|
||||
if(!istype(target) || !istype(user))
|
||||
return 0
|
||||
var/obj/item/projectile/test/trace = new /obj/item/projectile/test(get_step_to(user,target)) //Making the test....
|
||||
trace.target = target
|
||||
if(!isnull(flags))
|
||||
trace.flags = flags //Set the flags...
|
||||
trace.pass_flags = pass_flags //And the pass flags to that of the real projectile...
|
||||
trace.firer = user
|
||||
var/output = trace.process() //Test it!
|
||||
qdel(trace) //No need for it anymore
|
||||
return output //Send it back to the gun!
|
||||
Reference in New Issue
Block a user