Secbots now continually checks if their target remains in sight before bashing the head in.
This commit is contained in:
PsiOmega
2015-03-04 12:28:07 +01:00
parent 6799569d16
commit 8feec5760f

View File

@@ -266,13 +266,19 @@ Auto Patrol: []"},
src.mode = 0
walk_to(src,0)
// We re-assess human targets, before bashing their head in, in case their credentials change
if(target && istype(target, /mob/living/carbon/human))
var/threat = src.assess_perp(target, idcheck, check_records, check_arrest)
if(threat < 4)
target = null
if(target) // make sure target exists
// We re-assess human targets, before bashing their head in, in case their credentials change
if(istype(target, /mob/living/carbon/human))
var/threat = src.assess_perp(target, idcheck, check_records, check_arrest)
if(threat < 4)
frustration = 8
return
// The target must remain in view to complete the desire to bash its head in
if(!(target in view(search_range,src)))
frustration++
return
if(!lasercolor && Adjacent(target)) // If right next to perp. Lasertag bots do not arrest anyone, just patrol and shoot and whatnot
if(istype(src.target,/mob/living/carbon))
playsound(src.loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)