Instead of storing a single flat list of positions and data per
building, RallyPoint now stores them keyed by player ID. This lets
mutual allies independently set and display rally points on each
other's structures.
The GUI now allows selecting allied buildings with a rally point
and only shows the viewing player's own rally point data.
GuiInterface gets an OnUpdate handler to keep displayed positions
in sync when rally point targets move.
GetRallyPointCommands now takes raw position and data arrays instead
of a component reference. The network command field is also renamed
from "entities" to "structures".
Fixes#3115
The function was used as a fallback for when a platform specific approach
isn't available. Given that it effectively is a roundabout way to derive
it from argv[0] which we use as a generic fallback anyway just remove
it.
This further allows to make cxxtest optional.
Refs: #8618
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This is more reliable than argv[0] which is effectively used via
unix_ExecutablePathname. Also drop the fallback as it effectively is the
same as the generic fallback and blocks making cxxtest optional.
On FreeBSD the procfs is not mounted by default, so use a syscall
instead.
Refs: #8618
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
The fallback is of little value and blocks making cxxtest an optional
build dependency. While at it use realpath instead of readlink.
Refs: #8618
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Remove stale NAN and INFINITY, both have equivalents since C++11 and
cleanup headers in wposix source file.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
I forgot to finish CSubmitScheduler synchronization in
7c84c23114. Even ++m_FrameID was
forgotten. And it worked at the time. A proper synchronization is
described in renderer/backend/Vulkan/SwapChain.h.
The disabled test are all broken one way or another. The maps used in
the tests got renamed. The pathfinder component got some performance
improvements which now require to call UpdateGrid() once before use.
Finally for the InitAttributes to be deep frozen they need to be an
object, so initialize them.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
test_hash depends on modmod for xml schemas. InitAttributes need to be
set as deep freezing expects them to be a valid object. The map used got
renamed at some point. Finally prior to running the sim PreInitGame()
and InitGame() need to be called.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Don't declare empty constructor and destructor, avoid c-style cast and
remove TODO about a bug that can't be reproduced any longer.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Unused and since C++17 not really valuable with std::aligned_alloc
(_aligned_malloc and _aligned_free in case of MSVC) available. We also
have an other similar interface with "lib/sysdep/vm.h".
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
KEY_DOWN means we need to check for the "down" values instead of "char"
value which differer for numpad.
Ref: #501
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
9 isn't a valid playerID, setting this value causes a JS error
and corrupting the viewport.
Further limit selectable max playerID to what the mapSettings say.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
In many places there are missing gaps/borders and where there are there
are almost random values used (2/3/4/5/8/10/15).
Add missing and standardize on using gaps 5 and 10 pixel only.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
getTotalQueueTime(queue) calculates total remaining
queue time of a production building.
getBuildingsSortedByQueueTime(entities), sorts building selection
by their queued training time and filter invalid entities
Removes the resource availability guard from the Training selection
panel onPress handler to align mouse interaction with hotkey behavior
The `closePageCallback` isn't forwarted to the function calling it. Now
it's possible again to continue a saved campaign.
The error was introduced in 76b6725272.
Since C++11 a C typedef'ed union can be forward declared, so the wrapper
is no longer needed.
While at it switch signatures to refs and convert C style casts.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Add registerGlobalGuiPageHotkeys() to
common/functions_utility.js to selectively register
GUI page hotkeys
Allow active GUI pages to close using their corresponding hotkey
Move page_hotkeys.xml from gui/hotkeys/ to gui/
Update page_hotkeys.xml references in MainMenuItems and MenuButtons
Add default tipScrolling fallback in TipsPage when no initData is provided
Now we should use material passes instead of context and defines to
select a needed shader. It allows us to reduce the number of
shader combinations we use and reduce memory consumption.
All shaders were selected by context (set of defines) which increases
the number of needed permutations. For example: we don't need to know
about shadows when rendering silhouettes.
We were unnecessary passing all combinations of our scene shader context
even if we don't need it as for shadows and silhouettes for terrain
rendering. Since we only need to draw a solid color.
When the returned value of the compare function is `0` the order is
preserved. Before the sort, the order between joining clients and
non-joining clients differ.
Additionally sorting by name should make the order consintent.
The AI only noticed for changes to `isIdleConfirmed`. That is done to
avoid recursions and don't send to many messages. But when the AI is
deserialized it get's `isIdle` from the simulation. Leading to an OOS.
When the returned value of the compare function is `0` the order is
preserved. Before the sort, the order between joining clients and
non-joining clients differ.
Now everything important (which is used later on) is included in the
comparison. If still `0` is returned it's not importent which element is
taken.
Another solution would be to have one array per category.
The metadata where written every the turn of deserialization. When on
the non rejoining client it was only written when that AI makes a turn
and handles the events.
On a rejoined client the data isn't the same anymore. But it's equal.
Likely this is because the data isn't aquired at the same turn.
This could also be solved more generally by copying all data which is
pushed to the AI. Or by using the same serializer for AI as for the rest
of the simulation.