OpenGothic icon indicating copy to clipboard operation
OpenGothic copied to clipboard

Rework `canSense` and `canSee` functions

Open thokkat opened this issue 1 year ago • 0 comments

I reworked some functions based on testing:

  • active perceptions are only perceived if npc has SENSE_SMELL or SENSE_SEE and canSee returns true, SENSE_HEAR does nothing
  • passive perceptions only care for perc range and ignore senses and canSee
  • canSee only cares for senses range
  • npc_getnexttarget doesn't need line of sight.

This fixes Lares not stopping if guiding the player and shattered golem not attacking. To keep sneaking working while opening a chest walkbit is now used instead of bodystate for sneak mode testing.

thokkat avatar Mar 03 '24 16:03 thokkat