Closed thokkat closed 4 months ago
Thanks for PR, @thokkat !
If a new state is started the end time is not set to infinite but the current daily routine end time is kept instead.
Can you please add this as a comment to code? In case if we would run into another state-tracking issue, we better keep knowledge of why gtime::endOfTime()
is important.
Added comment.
Merged, thanks!
If a new state is started the end time is not set to infinite but the current daily routine end time is kept instead. So if a npc is fighting but a new daily routine begins the npc would quit the fight and go home. There's already code that excludes
zs_talk
from early ending.This has been changed in https://github.com/Try/OpenGothic/commit/7af7f0ce28f53532d5fab29e0524e73f8556bedc to avoid daily routines breaking. In my testing everything worked correctly with the pr change, likely code change over time made daily routines more robust.