Page MenuHomeWildfire Games

Fix StandGround freezing units.
ClosedPublic

Authored by wraitii on Jan 24 2021, 9:02 AM.

Details

Summary

In A23, switching units to 'standground' will stop them from moving, and they will then either go idle or execute their next order.
In A24, it stops them from moving, but UnitAI doesn't expect that and so they generally just end up frozen in their current state.

This removes this custom handling entirely, units now carry on like other stances.

Test Plan

Switch to standground

Diff Detail

Repository
rP 0 A.D. Public Repository
Branch
master
Lint
Lint OK
SeverityLocationCodeMessage
Warningbinaries/data/mods/public/simulation/components/UnitAI.js:348ESLintBear (consistent-return)ESLintBear (consistent-return)
Warningbinaries/data/mods/public/simulation/components/UnitAI.js:790ESLintBear (no-else-return)ESLintBear (no-else-return)
Warningbinaries/data/mods/public/simulation/components/UnitAI.js:2159ESLintBear (operator-linebreak)ESLintBear (operator-linebreak)
Unit
No Unit Test Coverage
Build Status
Buildable 15376
Build 33555: Vulcan BuildJenkins
Build 33554: Vulcan Build (macOS)Jenkins
Build 33553: Vulcan Build (Windows)Jenkins
Build 33552: arc lint + arc unit

Event Timeline

wraitii created this revision.Jan 24 2021, 9:02 AM

Build is green

builderr-debug-macos.txt
../../../source/graphics/ShaderProgram.cpp:86:15: warning: 'Reload' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
        virtual void Reload()
                     ^
../../../source/graphics/ShaderProgram.h:124:15: note: overridden virtual function is here
        virtual void Reload() = 0;
                     ^
../../../source/graphics/ShaderProgram.cpp:118:15: warning: 'Bind' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
        virtual void Bind()
                     ^
../../../source/graphics/ShaderProgram.h:135:15: note: overridden virtual function is here
        virtual void Bind() = 0;
                     ^
../../../source/graphics/ShaderProgram.cpp:128:15: warning: 'Unbind' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
        virtual void Unbind()
                     ^
../../../source/graphics/ShaderProgram.h:140:

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

wraitii requested review of this revision.Jan 24 2021, 9:20 AM
wraitii updated the Trac tickets for this revision.Jan 24 2021, 9:30 AM

I would actually like to just remove those lines. I frequently order my units somewhere and thereafter set them to standground. But I guess I might be alone on that ;)
For now this makes sense more (A23b behaviour).

binaries/data/mods/public/simulation/components/UnitAI.js
5942

Why not just ^ ?

I think we should probably change that as part of a more extensive stance rewrite ;)

binaries/data/mods/public/simulation/components/UnitAI.js
5942

Slightly more explicit. I don't really have a strong reason tbh.

wraitii updated this revision to Diff 15702.Jan 26 2021, 8:49 AM

Instead make units not stop. Merging this soon.

wraitii edited the summary of this revision. (Show Details)Jan 26 2021, 8:49 AM

Build is green

builderr-debug-macos.txt
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/Frameworks//AudioToolbox.framework/AudioToolbox.tbd and library file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//ForceFeedback.framework/ForceFeedback.tbd and library file /System/Library/Frameworks//ForceFeedback.framework/ForceFeedback are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreVideo.framework/CoreVideo.tbd and library file /System/Library/Frameworks//CoreVideo.framework/CoreVideo are out of sync. Falling back to library file for linking.
ld: warning: text-based stu

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

This revision is now accepted and ready to land.Jan 26 2021, 10:17 AM
This revision was automatically updated to reflect the committed changes.