-
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix some bugs in dialogue parsing (in ChatHandler) [ci skip] (#2357
) * fix: Use ticks for measuring slow packet difference, fix tick scheduler manager having an inconsistent order with the tick events The logic was correct, but using `System.currentTimeMillis` is too "inaccurate" for tick timing in many cases. Since the packet difference is actually measured in ticks, we might as well use that here as well. I've bumped the timeout ticks from 10 to 20, since the previous value was too low for some cases. This also fixes the tick scheduler manager having an inconsistent order with the tick events, which also caused the same issue. The new order of operations is: 1. TickAlwaysEvent 2. Run the tick scheduler (highest TickAlwaysEvent priority) 3. TickEvent This fixes the issue where tick events could schedule a task for the next tick, but the tick scheduler would run it at the same tick event, since the tick always event was run after the tick event. * fix: Fix chat handler "missing" a tick when collecting dialogue This bug resulted in the handler not collecting chat lines correctly rarely, while in dialogue, dumping a lot of duplicated background text. * fix: Fix the "last" bad tick logic in ChatHandler
- Loading branch information
1 parent
a91ad35
commit c2d2c16
Showing
3 changed files
with
23 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters