Page MenuHomeWildfire Games

Fix issues with Cheering and PushOrderFront
ClosedPublic

Authored by wraitii on Jan 22 2021, 8:52 PM.

Details

Summary

See https://code.wildfiregames.com/rP24034#48390
This fixes that by making sure that the cheer order isn't pushed back when PushOrderFront is called.

This whole non-forced pushorderfront thing is bad logic and needs to be taken out IMO, but that's a much more complicated task.

Reported by: snelius

Test Plan

Somewhat hard to reproduce: with a unit, kill units so that it cheers, then attack it while cheering, and then notice that it cheers again after killing that 2nd unit, no matter if there are other units around (incorrect).
This patch fixes that.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

wraitii created this revision.Jan 22 2021, 8:52 PM

Build is green

builderr-debug-macos.txt
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libsimulation2_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libengine_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libgraphics_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libatlas_dbg.a(precompiled.o) has no symbols
ld: warning: text-based stub file /System/Library/Frameworks//CoreAudio.framework/CoreAudio.tbd and library file /System/Library/Frameworks//CoreAudio.framework/CoreAudio are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/F

See https://jenkins.wildfiregames.com/job/macos-differential/3020/display/redirect for more details.

wraitii requested review of this revision.Jan 22 2021, 9:05 PM
Stan added a subscriber: Stan.Jan 23 2021, 12:52 PM
Stan added inline comments.
binaries/data/mods/public/simulation/components/UnitAI.js
3224–3226 ↗(On Diff #15629)

Maybe:

wraitii added inline comments.Jan 23 2021, 1:02 PM
binaries/data/mods/public/simulation/components/UnitAI.js
3224–3226 ↗(On Diff #15629)

I didn't do that because I didn't want to change the current order.

Silier accepted this revision.Jan 23 2021, 2:41 PM
This revision is now accepted and ready to land.Jan 23 2021, 2:41 PM
Stan added inline comments.Jan 23 2021, 2:43 PM
binaries/data/mods/public/simulation/components/UnitAI.js
3224–3226 ↗(On Diff #15629)

As discussed on IRC it's not particularly more readable so for is acceptable.

This revision was automatically updated to reflect the committed changes.