Page MenuHomeWildfire Games

Fix "Unit" Attack move.
ClosedPublic

Authored by wraitii on Jan 20 2021, 5:20 PM.

Details

Reviewers
None
Commits
rP24752: Fix unit-only Attack move.
Trac Tickets
#5944
Summary

The "unit" attack move modifier is no longer working. The cause is that it is more specific than Attack Move, and so Attack Move no longer triggers alongside it. Since attackmoveunit isn't a proper equivalent to attackmove, just a modifier to it, and it no longer has anything to modify, things don't work.

Change that to fix this issue.

Reported by: snelius

Test Plan

Try using attackmoveunit.

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 20 2021, 5:20 PM

Build is green

builderr-debug-macos.txt
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libengine_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/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/Cor

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

wraitii requested review of this revision.Jan 20 2021, 5:33 PM
Stan added a subscriber: Stan.Jan 21 2021, 1:42 PM
Stan added inline comments.
binaries/data/config/default.cfg
299 ↗(On Diff #15574)

Won't that lead to bug reports for people who remap their entire shortcuts?

source/ps/tests/test_Hotkeys.h
59 ↗(On Diff #15574)

What does that override?

Indeed, it's a bit hacky, hence the question "would you rather I change all 'if attackmove' to 'if attackmove or attackmoveunit'

binaries/data/config/default.cfg
299 ↗(On Diff #15574)

Well, only that that also use attackmoveUnit and map it to an incompatible hotkey.

source/ps/tests/test_Hotkeys.h
59 ↗(On Diff #15574)

Globals.h

Stan added a comment.Jan 21 2021, 3:40 PM

Would replacing them be less hacky?

The question is whether for another case where the actions were a bit more different we would do it?

wraitii updated this revision to Diff 15605.Jan 21 2021, 3:42 PM
wraitii edited the summary of this revision. (Show Details)

Actually going to change to this if thing, seems easier and less problematic for users.

In D3436#152434, @Stan wrote:

Would replacing them be less hacky?

yes

The question is whether for another case where the actions were a bit more different we would do it?

don't understand

Stan added a comment.Jan 21 2021, 3:44 PM

Would you do the replacement if instead of attackmove and attackmoveUnit it was say patrol and backtowork

yes

then do it, it's probably more maintainable than hacks in the long run.

Build is green

builderr-debug-macos.txt
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libengine_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/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/Cor

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

Build has FAILED

builderr-release-gcc7.txt
In file included from ../../../source/pch/engine/precompiled.h:18,
                 from ../../../source/ps/Hotkey.cpp:18:
../../../source/lib/precompiled.h:101: error: unterminated #if
 #if CONFIG_ENABLE_PCH
 
../../../source/lib/precompiled.h:78: error: unterminated #if
 #if CONFIG_ENABLE_BOOST
 
../../../source/lib/precompiled.h:57: error: unterminated #if
 #if ICC_VERSION
 
../../../source/lib/precompiled.h:47: error: unterminated #ifdef
 # ifdef NDEBUG // release: disable all checks
 
../../../source/lib/precompiled.h:44: error: unterminated #if
 # if MSC_VERSION < 1910
 
../../../source/lib/precompiled.h:43: error: unterminated #if
 #if MSC_VERSION
 
../../../source/lib/precompiled.h:35: error: unterminated #ifndef
 #ifndef MINIMAL_PCH
 
In file included from ../../../source/pch/engine/precompiled.h:23,
                 from ../../../source/ps/Hotkey.cpp:18:
../../../source/ps/CStr.h:94: error: unterminated #else
  #ifdef _UNICODE
 
../../../source/ps/CS

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/4665/display/redirect
See console output for more information: https://jenkins.wildfiregames.com/job/docker-differential/4665/display/redirectconsole

Build is green

builderr-debug-gcc7.txt
../../../source/network/scripting/JSInterface_Network.cpp: In function 'void JSI_Network::StartNetworkJoinLobby(ScriptInterface::CmptPrivate*, const CStrW&, const CStr8&, const CStr8&)':
../../../source/network/scripting/JSInterface_Network.cpp:169:71: warning: unused parameter 'pCmptPrivate' [-Wunused-parameter]
 void JSI_Network::StartNetworkJoinLobby(ScriptInterface::CmptPrivate* pCmptPrivate, const CStrW& playerName, const CStr& hostJID, const CStr& password)
                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
../../../source/lib/res/h_mgr.cpp: In function 'void h_free_hd(HDATA*)':
../../../source/lib/res/h_mgr.cpp:560:27: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'struct HDATA' with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess]
  memset(hd, 0, sizeof(*hd));
                           ^
../../../source/lib/res/h_mgr.cpp:132:8: note: 'struct HDATA' de

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

This revision was not accepted when it landed; it landed in state Needs Review.Jan 21 2021, 4:58 PM
This revision was landed with ongoing or failed builds.
Closed by commit rP24752: Fix unit-only Attack move. (authored by wraitii). · Explain Why
This revision was automatically updated to reflect the committed changes.