-
Notifications
You must be signed in to change notification settings - Fork 134
bugfix: Fix Gattling 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 Gattling Cannon barrels rotating despite insufficient energy #1766
Conversation
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 |
This still occurs |
|
Have you tested it? |
|
|
This might require a slightly different approach. I think I'm seeing the correct results when I do this:
//clearStatus( MAKE_OBJECT_STATUS_MASK( OBJECT_STATUS_IS_ATTACKING ) );
clearModelConditionState( MODELCONDITION_ATTACKING );FWIW, for quicker or alternative testing, you can use microwave tanks to disable either a power plant or disable the gattling cannon itself. |
I spent all day yesterday troubleshooting this - with your fix, the barrels still rotate for a moment just after the power goes out. They go from "power on, firing" to "power off, stopped" for a second, to "power off, spinning" for a second, then finally they stop. |
I'm seeing the same behavior. I tried a couple of things, but was unable to fix this. |
|
Could maybe be implemented like this: https://github.com/Caball009/GeneralsGameCode/tree/fix-gatling-barrel-animation-no-power2 The barrels spinning up shortly after the power goes out is because of |
|
Maybe a cleaner solution would be to modify |
410c19d to
7fd6ae6
Compare
…ansition when underpowered
7fd6ae6 to
8361fbf
Compare
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.