Skip to content

Commit

Permalink
OK changed signs and some values
Browse files Browse the repository at this point in the history
  • Loading branch information
morrowwolf committed Oct 27, 2023
1 parent 654dc3e commit 00f10ff
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions code/modules/mob/living/carbon/xenomorph/ai/movement/lurker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
var/total_baits = 0

// Distance at which we want to stay from our spotted target
var/stalking_distance = 10
var/stalking_distance = 12

// List of turfs we see and register while lurking
var/list/registered_turfs = list()
Expand All @@ -25,7 +25,6 @@
/datum/xeno_ai_movement/linger/lurking/New(mob/living/carbon/xenomorph/parent)
. = ..()

RegisterSignal(parent, COMSIG_MOVABLE_MOVED, PROC_REF(stop_lurking))
addtimer(CALLBACK(src, PROC_REF(check_annoyance)), AI_CHECK_ANNOYANCE_COOLDOWN, TIMER_UNIQUE|TIMER_LOOP|TIMER_DELETE_ME)

#undef AI_CHECK_ANNOYANCE_COOLDOWN
Expand Down Expand Up @@ -77,7 +76,7 @@
var/potential_home_dir = get_dir(idle_xeno, potential_home)
var/current_target_dir = get_dir(idle_xeno, idle_xeno.current_target)

if(current_target_dir != potential_home_dir && current_target_dir != turn(potential_home_dir, 45) && current_target_dir != turn(potential_home_dir, -45))
if(current_target_dir == potential_home_dir || current_target_dir == turn(potential_home_dir, 45) || current_target_dir == turn(potential_home_dir, -45))
continue

var/xeno_to_potential_home_distance = get_dist(idle_xeno, potential_home)
Expand Down Expand Up @@ -106,7 +105,7 @@
return ..()

var/turf/target_turf = get_turf(moving_xeno.current_target)
if(ai_lurking || get_dist(moving_xeno, target_turf) > world.view + 2)
if(ai_lurking || get_dist(moving_xeno, target_turf) > world.view + 1)
if(get_dist(moving_xeno, target_turf) > stalking_distance)
home_turf = null
return moving_xeno.move_to_next_turf(target_turf)
Expand All @@ -124,6 +123,11 @@
if(!annoyed_xeno.current_target || !ai_lurking)
return

if(get_dist(annoyed_xeno, annoyed_xeno.current_target) > 8)
annoyance = 0
total_baits = 0
return

annoyance++

if(prob(annoyance))
Expand Down

0 comments on commit 00f10ff

Please sign in to comment.