-
Notifications
You must be signed in to change notification settings - Fork 118
bugfix: Fix Gatling Cannon barrels rotating despite insufficient energy #1766
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
bugfix: Fix Gatling Cannon barrels rotating despite insufficient energy #1766
Conversation
| return false; | ||
|
|
||
| // TheSuperHackers @bugfix bobtista 31/10/2025 Fixes Gatling Cannon barrels rotating despite insufficient energy. (#1700) | ||
| if ( isKindOf( KINDOF_POWERED ) && isDisabledByType( DISABLED_UNDERPOWERED ) ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So previously, patriot and strat centre would also show attack mouse marker rather than disabled mouse marker?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes - in retail, Patriots (and any other KINDOF_POWERED structures) would also show the attack mouse marker rather than the disabled mouse marker when underpowered.
However, the Strategy center cannon is not a powered thing, it can still force fire like a fire base without power.
I've tested these with this fix - while undepowered, the patriot and gatling cannon now correctly show the disabled mouse cursor, and the strategy center can still force fire its cannon.
66be9c0 to
b2278a6
Compare
|
This wants testing for retail compatibility |
This one’s tricky. I ran a comparison test:
When playing in vanilla and replaying in this PR, the barrels still move when the force-attack command was given. That suggests the barrel rotation state is recorded in the replay. However, there is no mismatch, so maybe it is not transferred in the xfer. To stay safe, I’d recommend putting this change behind CRC guards. Also, there’s an edge case still present in this PR:
|
b2278a6 to
e8b36a1
Compare
I added another check in adjustModelConditionForWeaponStatus() that hopefully addresses the spinning animation edge case - I can't test it this week though, if someone else can try it. I put the change behind CRC guards |
Addresses issue #1700
Tested by building a power plant, then a gatling cannon, force firing it, then selling the power plant and trying to force fire.
Result: The gatling cannon can no longer force fire while powered down, the "can't" mouse cursor is displayed, and there is no spinning animation.