Prerequisites
Game Version
Bug Description
When building a USA Strategy Center in a build configured with RETAIL_COMPATIBLE_CRC=0, the special-power command buttons are permanently disabled. They don't highlight on hover and can't be clicked. Other buttons (e.g. upgrades like Advanced Training) work normally.
Cause:
SpecialPowerModule::m_availableOnFrame was changed in #1218 to initialize to 0xFFFFFFFF ("never ready") instead of 0 under !RETAIL_COMPATIBLE_CRC. A building constructed by the player is created with OBJECT_STATUS_UNDER_CONSTRUCTION, so the SpecialPowerModule constructor skips startPowerRecharge(). The recharge is expected to happen at build completion via a SpecialPowerCreate module - but buildings that don't have that module (eg Strategy Center) never charged, so m_availableOnFrame stays at the 0xFFFFFFFF sentinel and isReady() is permanently false. Under retail (m_availableOnFrame = 0) these powers were ready by default, which is why the regression only appears with RETAIL_COMPATIBLE_CRC=0.
Reproduction Steps
Run a game with retail compatibility off, build a strategy center, try to click Search and Destroy or use Intelligence.
Additional Context
No response
Prerequisites
Game Version
Bug Description
When building a USA Strategy Center in a build configured with RETAIL_COMPATIBLE_CRC=0, the special-power command buttons are permanently disabled. They don't highlight on hover and can't be clicked. Other buttons (e.g. upgrades like Advanced Training) work normally.
Cause:
SpecialPowerModule::m_availableOnFrame was changed in #1218 to initialize to 0xFFFFFFFF ("never ready") instead of 0 under !RETAIL_COMPATIBLE_CRC. A building constructed by the player is created with OBJECT_STATUS_UNDER_CONSTRUCTION, so the SpecialPowerModule constructor skips startPowerRecharge(). The recharge is expected to happen at build completion via a SpecialPowerCreate module - but buildings that don't have that module (eg Strategy Center) never charged, so m_availableOnFrame stays at the 0xFFFFFFFF sentinel and isReady() is permanently false. Under retail (m_availableOnFrame = 0) these powers were ready by default, which is why the regression only appears with RETAIL_COMPATIBLE_CRC=0.
Reproduction Steps
Run a game with retail compatibility off, build a strategy center, try to click Search and Destroy or use Intelligence.
Additional Context
No response