Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign up[PhaseFour] broken item chat spam #345
Comments
This comment has been minimized.
This comment has been minimized.
|
This looks like an infinite loop issue. Here's the trace of functions being called: So what ends up happening is that the code checking for durability is called every time the PlayerThink function is called. My suggestion is to move the durability code to a different callback, such as when the player explicitly tries to fire a weapon. I'm not sure if this is possible, I'll look in to it. |
This comment has been minimized.
This comment has been minimized.
|
I've reproduced the bug. |
This comment has been minimized.
This comment has been minimized.
|
I've gotten this fixed. The fix has been committed to the private repository for Phase Four. I had to do a sort of workaround by adding the NotifyBrokenWeapon command which gets executed when primary/secondary attack is pressed with the broken weapon equipped, it also gets executed when the weapon is wielded. Fun fact: Clockwork.player:Notify can't be executed in clientside files, hence the workaround. If anyone knows of a way to use Clockwork.player:Notify without having to use a command then feel free to let me know. :) |
After firing any weapon until the point the durability reaches 0 it breaks. That works like it's intended, but what then happens is it floods the players chat and console with this:
After switching off the weapon immediately stops this spam but the second you switch back to the weapon it starts back up. Even after holster / dropping then re-equipping the same thing happens.
Edit: I found out the HTML Message occurs every time you open the Tab Menu.