Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addon: [1.7.53] - Fix: improved way to detect kills by honoring cell show time. #572

Merged
merged 2 commits into from
Feb 24, 2024

Conversation

Xian55
Copy link
Owner

@Xian55 Xian55 commented Feb 24, 2024

The original idea:

  • Create a construct which has a fixed update time to periodically update the cell value(COMBAT_LOG_ITERATION_FRAME_CHANGE_RATE) is currently 5 update tick. This is tied to the FPS(higher the number it happens more often)
  • Make the ability to interrupt the deterministic update flow to react the change instantly meanwhile honouring the periodically update(when a kill happens, don't fully await the 5 update ticks, but rather show the value immediately, but make sure to show the value for the 5 update tick duration)
  • What left out is to record the actual event time, and based on that recorded time wait for at least COMBAT_LOG_ITERATION_FRAME_CHANGE_RATE duration

The problem:

  • Below certain amount of stable cell wait time - usually below 5 update tick - the system become unstable and the backend is unable to read with great certainty of the addon produced values. There are many factors such as unstable frame rate.
  • The code where used the following construct for detecting damageDone, damageTaken, deadGuid values by
globalCounter % COMBAT_LOG_ITERATION_FRAME_CHANGE_RATE == 0 
or
globalCounter - lastDied > COMBAT_LOG_ITERATION_FRAME_CHANGE_RATE
  • The given code were not respected the COMBAT_LOG_ITERATION_FRAME_CHANGE_RATE duration and sometimes ended up showing the cell for 0 or 1 tick time which made the backend impossible to read the values.
  • its important to mention that, globalTick can overflow the 24bit resolution so have to account for negative subtraction. Based on the in-game FPS. With 60fps it can occurs about every 48-72 hours(if i did the math correctly)

The new code:

  • Adds more complexity, but it adds more reliability as well.

@Xian55 Xian55 added the bugfix This pull request fixes an issue. label Feb 24, 2024
@Xian55 Xian55 linked an issue Feb 24, 2024 that may be closed by this pull request
@Xian55 Xian55 merged commit 3fc6d0f into dev Feb 24, 2024
1 check passed
@Xian55 Xian55 deleted the fix/556 branch February 24, 2024 01:24
@Xian55 Xian55 mentioned this pull request Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This pull request fixes an issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Randomly not looting
1 participant