Skip to content

Commit

Permalink
AI targeting Changes
Browse files Browse the repository at this point in the history
Update code/modules/mob/living/simple_animal/hostile/hostile.dm

Update hostile.dm

Co-Authored-By: [̸R̵e̵d̴a̴c̶t̸e̸d̴]̵ <[email protected]>
  • Loading branch information
InsightfulParasite and LanceSmites328 committed Dec 4, 2023
1 parent ab8d0ff commit 3629cee
Show file tree
Hide file tree
Showing 5 changed files with 398 additions and 240 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@
/// How far away you can be to make eye contact with someone while examining
#define EYE_CONTACT_RANGE 5

//simple_mob_flags
#define SILENCE_RANGED_MESSAGE (1<<0)

///Swarmer flags
Expand Down
8 changes: 6 additions & 2 deletions code/__HELPERS/_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,9 @@
if(!current_lowest)
current_lowest = i
continue
if(L[i] <= L[current_lowest])
if(L[i] < L[current_lowest])
current_lowest = i
else if(L[i] == L[current_lowest] && prob(50))
current_lowest = i
if(!current_lowest)
return null
Expand All @@ -583,7 +585,9 @@
if(!current_highest)
current_highest = i
continue
if(L[i] >= L[current_highest])
if(L[i] > L[current_highest])
current_highest = i
else if(L[i] == L[current_highest] && prob(50))
current_highest = i
if(!current_highest)
return null
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/idlenpcpool.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ SUBSYSTEM_DEF(idlenpcpool)
name = "Idling NPC Pool"
flags = SS_POST_FIRE_TIMING|SS_BACKGROUND|SS_NO_INIT
priority = FIRE_PRIORITY_IDLE_NPC
wait = 60
wait = 25
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME

var/list/currentrun = list()
Expand Down
Loading

0 comments on commit 3629cee

Please sign in to comment.