1
Bug Reports & Support (modded) / [0.9a RC10] Unexpected Behaviour: BaseToggleAbility.deactivate() not guaranteed
« on: December 13, 2018, 05:35:46 PM »
It's possible to call BaseToggleAbility.deactivate() and not actually deactivate an ability, if some time between the start of the ability and the call to deactivate, it's become no longer usable.
This is due to line 205, which is
While I can't say for sure this is a bug as such, it was -really- unexpected behaviour as I was in fact checking isUsable() and then calling deactivate() to untoggle it if it became unusable.
Apologies if this is intended behaviour, but I was expecting only the check for isActive when I'm trying to deactivate something.
This is due to line 205, which is
Code
if (isActive() && isUsable()) {
While I can't say for sure this is a bug as such, it was -really- unexpected behaviour as I was in fact checking isUsable() and then calling deactivate() to untoggle it if it became unusable.
Apologies if this is intended behaviour, but I was expecting only the check for isActive when I'm trying to deactivate something.