Try / OpenGothic

Reimplementation of Gothic 2 Notr
MIT License
1.17k stars 85 forks source link

Don't use a time limit for non-daily routine states #648

Closed thokkat closed 4 months ago

thokkat commented 5 months ago

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.

Try commented 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.

thokkat commented 4 months ago

Added comment.

Try commented 4 months ago

Merged, thanks!