Closed bensusman closed 3 years ago
Fixes #49
Thanks for your contribution! What do you think the usage of the armlet should be?
@adamqqqplay From what I can tell the root of the issue comes down to the fact that the armlet toggle has no effective cooldown - making it possible to toggle very quickly. This creates less of a functional benefit to the hero, but creates a ton of churn.
I'm not sure if it is the number actions that need to be processed, the loop in and of itself or the particles etc that functionally cause the slowdown.
My thought is to remove instances of:
if not IsUsingArmlet then
itemArmlet.lastOpenTime = nil
return
end
and always check similar to: https://github.com/adamqqqplay/dota2ai/blob/master/util/ItemUsageSystem.lua#L624
not IsUsingArmlet and DotaTime() - itemArmlet.lastOpenTime >= 0.6
before any armlet toggle.
I'll create a follow up PR and can decide with above kind of logic if you think it sounds reasonable.
@adamqqqplay From what I can tell the root of the issue comes down to the fact that the armlet toggle has no effective cooldown - making it possible to toggle very quickly. This creates less of a functional benefit to the hero, but creates a ton of churn.
I'm not sure if it is the number actions that need to be processed, the loop in and of itself or the particles etc that functionally cause the slowdown.
My thought is to remove instances of:
if not IsUsingArmlet then itemArmlet.lastOpenTime = nil return end
and always check similar to: https://github.com/adamqqqplay/dota2ai/blob/master/util/ItemUsageSystem.lua#L624
not IsUsingArmlet and DotaTime() - itemArmlet.lastOpenTime >= 0.6
before any armlet toggle.I'll create a follow up PR and can decide with above kind of logic if you think it sounds reasonable.
Hello, I think your ideas are very meaningful. Switching Armlet and similar items without cooling time is indeed an important reason for the crash of the game. Although it cannot fundamentally solve the logical problem of the infinite loop of item switching, it can greatly alleviate this problem.
Therefore, I hope you can submit this part of the code in the future to further improve our game experience. Thank you!
Temporarily removing armlet while more robust implementation for usage logic can be worked through.
*Happy to write up / discuss the desired armlet usage.