Robosturm / Commander_Wars

The aim of this project is to create an Advance Wars Clone with a lot of additions customizations and modding support. For Contact Inforamtion see the wiki page. Take a view on the game.
https://github.com/Robosturm/Commander_Wars/releases
GNU Lesser General Public License v3.0
213 stars 33 forks source link

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

Closed Brilliand closed 5 months ago

Brilliand commented 5 months ago

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):

Robosturm commented 5 months ago

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.