zenyr / PocoHud3

(Sunsetted) Payday2 Interface enhancer MOD
56 stars 29 forks source link

PocoHud icon keeps counting down the ECM timer even though ECM is gone #32

Open karasuhebi opened 8 years ago

karasuhebi commented 8 years ago

If you set up an ECM on a glass surface and then destroy the glass, the ECM gets destroyed but PocoHud keeps counting down, making people think the ECM is still in effect.

ghost commented 8 years ago

I have pushed my first attempt to fix this to my repo. It seems to work as intended when I tried it in singleplayer / as host. And it should work for clients too, but it needs a good amount of testing still. Also, the function is quite bulky, I'm not sure if it could be made a bit nicer.

karasuhebi commented 8 years ago

Do you have a link to build based on your repo? I'd be glad to test it if you feel like it's ready for a public test.

zenyr commented 8 years ago

Wooh, almost missed this notification. How's it working? Couldn't play a single game for a few days, locked outta my gaming rig 9 am to 11 pm everyday. dang.

ghost commented 8 years ago

@karasuhebi It's on my GitHub. All I changed was Hud3.lua, so you'd only have to replace that file in your PocoHud folder.

@zenyr Basically, it keeps a list of all ECMJammerBase instances, which is updated inside the set_active hook function. It also hooks ECMJammerBase:destroy, in which it uses the list to determine if there is any other ECM running to update the timer buff or remove it.

karasuhebi commented 7 years ago

Any updates on this one?