Page MenuHomeWildfire Games

Do not set formation members idle when their controller is not.
ClosedPublic

Authored by wraitii on Jan 12 2021, 10:57 AM.

Details

Reviewers
Freagarach
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Commits
rP24596: Do not count formation members as 'idle' if the controller is not.
Summary

Most notably visible when formations are patrolling and checking their waypoint.
The ideal fix would be that the members are checking the waypoint as well.

rP24360 / D2913 introduced the problem for patrol.

Test Plan

Patrol with a formation and hit the idleworker hotkey when the formation is checking a waypoint.

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

Freagarach created this revision.Jan 12 2021, 10:57 AM

I think this would work but you'll have to call "maybeSetIdle" (doesn't exist) when the controller enters Idle, as some members might have already been idle.

Alternatively:

  • Find the formation controller with the 'global idle' button, which selects the formation
  • Never report formations in the Idle worker button.

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/2785/display/redirect for more details.

Freagarach requested review of this revision.Jan 12 2021, 11:05 AM
wraitii updated this revision to Diff 15236.Jan 13 2021, 9:52 AM

Slight tweak.
I think this works well enough for A24

wraitii retitled this revision from [WIP] - Do not set formation members idle when their controller is not. to Do not set formation members idle when their controller is not..Jan 13 2021, 9:52 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/2824/display/redirect for more details.

Freagarach added inline comments.Jan 13 2021, 10:06 AM
binaries/data/mods/public/simulation/components/UnitAI.js
1556 ↗(On Diff #15236)

This is called often, so the function call is not nice, I think you can get away with some duplication (since this is merely called for idle units).
Else: I like explicit function names more ;)

wraitii updated this revision to Diff 15255.Jan 13 2021, 3:57 PM

Remove the function

wraitii accepted this revision.Jan 13 2021, 3:59 PM

I guess I'll approve it for process, but this was written upon my request so I'm both judge and party :P

This revision is now accepted and ready to land.Jan 13 2021, 3:59 PM
Freagarach added inline comments.Jan 13 2021, 4:02 PM
binaries/data/mods/public/simulation/components/UnitAI.js
1554 ↗(On Diff #15255)

Why remove this?

3550 ↗(On Diff #15255)

^

wraitii commandeered this revision.Jan 13 2021, 4:04 PM
wraitii edited reviewers, added: Freagarach; removed: wraitii.
This revision now requires review to proceed.Jan 13 2021, 4:04 PM
wraitii updated this revision to Diff 15256.Jan 13 2021, 4:04 PM

Comments

wraitii edited the summary of this revision. (Show Details)Jan 13 2021, 4:07 PM
Freagarach accepted this revision.Jan 13 2021, 4:15 PM

Working as advertised. Might be weird to validate my own patch ;) But we two agree xD

This revision is now accepted and ready to land.Jan 13 2021, 4:15 PM

Build is green

builderr-debug-macos.txt
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libnetwork_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libtinygettext_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libtinygettext_dbg.a(tinygettext.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/liblobby_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libglooxwrapper_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file

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

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/2843/display/redirect for more details.