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

Fix kill and damage counters related to Update 205 #919

Merged
merged 1 commit into from Jul 21, 2022

Conversation

chrhasse
Copy link
Contributor

@chrhasse chrhasse commented Apr 3, 2021

Description

lib/managers/statisticsmanager now requires lib/units/enemies/cop/CopDamage as seen here which causes Wolfhud to hook into the cop damage events twice in DamagePopup.lua, KillCounter.lua, TabStats.lua, and GameInfoManager.lua. This commit causes WolfHUD to check to see if the the given file has already been loaded before adding the hooks.

Fixes #918

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Selected a random heist from crime.net, then watched the damage popups and kill counters in tabstats and on the hud to ensure accuracy
  • Finished the heist and selected a second to ensure the fix is retained after multiple heists

Checklist:

  • My changes generate no new warnings
    Truthfully I don't know how to check this. I am not proficient at lua and I am not positive this is the best way to make this change. However it does seem to work and it's a very small change, only 8 loc changed so it should be simple for someone more experienced to ensure that it's a good idea.

`lib/managers/statisticsmanager` now requires `lib/units/enemies/cop/CopDamage` as seen [here](AzureeDev/payday-2-luajit@d3c7f36#diff-67cbe58e3c31bbdd35061d98c3a8bf78e86155022b9bdd7a80c3cf8fa6e9590bR2) which causes Wolfhud to hook into the cop damage events twice in `DamagePopup.lua`, `KillCounter.lua`, `TabStats.lua`, and `GameInfoManager.lua`. This commit causes WolfHUD to check to see if the the given file has already been loaded before adding the hooks.
@jaondayko
Copy link

Hey there! I grabbed this pull request and put it in my repo if you would want to update there instead! The owner of this one has been missing for a bit! I am currently out of town so I didn’t get a chance to take a look and if this fixes it I thank you a lot!

@icwiener25
Copy link

Thank you, this has fixed the issue.

@NihiliusDE
Copy link

THX, works fine :)

@Kamikaze94 Kamikaze94 merged commit 3c4a82a into Kamikaze94:master Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problem with killcounter and damage popups after Update 205
5 participants