It can happen that the attacked unit is already dead when the gui gets the notification. In that case it fails to get its position.
As a fix the location is already determined in the simulation and send along with the notification to the gui.
(This also looks way cleaner in general)
Details
Details
- Reviewers
Freagarach Silier - Commits
- rP24736: Fix attack notification (rP24565)
Diff Detail
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
Comment Actions
Build has FAILED
builderr-debug-macos.txt fatal error: fatal errorfatal error: : file '/Users/wfg/Jenkins/workspace/macos-differential/build/workspaces/gcc/../../../libraries/source/spidermonkey/include-unix-debug/js/Result.h' has been modified since the precompiled header 'obj/simulation2_Debug/precompiled.h.gch' was builtfile '/Users/wfg/Jenkins/workspace/macos-differential/build/workspaces/gcc/../../../libraries/source/spidermonkey/include-unix-debug/js/Result.h' has been modified since the precompiled header 'obj/simulation2_Debug/precompiled.h.gch' was built file '/Users/wfg/Jenkins/workspace/macos-differential/build/workspaces/gcc/../../../libraries/source/spidermonkey/include-unix-debug/js/Result.h' has been modified since the precompiled header 'obj/simulation2_Debug/precompiled.h.gch' was built note: fatal errornotenote: : please rebuild precompiled header 'obj/simulation2_Debug/precompiled.h.gch': file '/Users/wfg/Jenkins/workspace/macos-differential/build/workspaces/gcc/../../../libraries/
Link to build: https://jenkins.wildfiregames.com/job/macos-differential/2902/display/redirect
See console output for more information: https://jenkins.wildfiregames.com/job/macos-differential/2902/display/redirectconsole
Comment Actions
Probably a insta-kill attack would do the job of reproducing.
binaries/data/mods/public/gui/session/messages.js | ||
---|---|---|
201 ↗ | (On Diff #15394) | Ah, yes, I did mean that xD I was so confused when reading my comment on the commit ^^' |
Comment Actions
- Fixes the described issue
- Getting the position there is indeed cleaner, but also more performant probably (no need to get the entity state in the message).
binaries/data/mods/public/simulation/components/AttackDetection.js | ||
---|---|---|
128 ↗ | (On Diff #15394) | could use event.position to avoid re-querying. |
Comment Actions
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/liblobby_dbg.a(precompiled.o) has no symbols ../../../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) ^ 1 warning generated. /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/Core
See https://jenkins.wildfiregames.com/job/macos-differential/2996/display/redirect for more details.