Robosturm/Commander_Wars

CO range turned back on during a power stays hidden, but continues to give bonus

Brilliand opened this issue · 1 comments

Describe the bug
The function "CO::setCoRangeEnabled" looks like it should be able to turn the CO range back on during a power. When that function is used for that purpose, the CO range resumes working for the purpose of "inCORange", but the game still doesn't draw the CO range.

To Reproduce
Steps to reproduce the behavior:

  1. Create a modded CO that uses "co.setCoRangeEnabled(true);" in one of its powers
  2. Activate that power during a game while the CO is loaded into a unit
  3. Observe that the CO range vanishes
  4. If the CO is coded to give a bonus to units in the CO zone even during powers, you can can also experiment with attacks in and out of the regular CO zone to determine that the zone is still giving its bonus.

Expected behavior
When the CO zone is re-enabled during a power with "CO::setCoRangeEnabled", the CO zone boundary should be drawn by the game.

Desktop (please complete the following information):

  • OS: Windows 10
  • Version: 2004
  • Active Mods: Several. Probably doesn't matter as the bug is about a modding interface.
  • Game Version: 0.33.1-main

setCoRangeEnabled is used for the Damage Calculator and using it outside of it is prohibited.
The requested function to show the CO-Range during powers isn't supported atm.