The bug came from inlining the copy constructor of Grid, which ended up
reading from un-initialized variables.
Discussed with leper who had a similar fix for a test failure locally.
Fixes#4859
Differential Revision: https://code.wildfiregames.com/D1048
This was SVN commit r20520.
(Don't replace the starting base code of that map to a call to
placeStronghold because the code in this variant is the only one that
doesn't have resource collisions on tiny maps currently, refs #3851.)
This was SVN commit r20516.
The code intended to group players per team on a single island (even if
more than 4 players in one team).
But since it used sortAllPlayers playerIDs instead of onIsland, the
players were not actually grouped per team.
Drop the additional, slightly redundant complexity and just place at
most 4 players per side like the other naval maps do too.
If greater groups per side are wished, it can be changed later
consistently for all maps.
This was SVN commit r20515.
It was only triggered if a civ wasn't set in Atlas.
Because civs are expected to be well-defined everywhere, alwas set the
property in Atlas too, fixing the non-GUI part of #4869.
Use the existing player defaults value then instead of hardcoding a
fallback civ string.
This was SVN commit r20512.
Revert the introduction of the exact copies of FileExists ReadJSONFile
functions in MapGenerator.cpp introduced by 871ed04521.
Include JSInterface_VFS.cpp from MapGenerator.cpp to remove that code
while gaining the other missing VFS file loading functions in rmgen/.
Split RegisterScriptFunctions of JSInterface_VFS.cpp from eb4e66aab3
into RegisterReadOnlyScriptFunctions and RegisterWriteScriptFunctions to
prevent unintentional write access.
This was SVN commit r20507.
Fix resource collisions on that island.
Incrase the radius, not the area of the island proportionally to the map
radius.
Prevent the island from becoming passable without ships.
Use the non-deprecated createObjectGroups variant.
This was SVN commit r20503.
While at it also nuking some duplicate template entries
Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1038
This was SVN commit r20498.
Use it to illustrate the building placement preview rotation and
focusing of attacked units.
Split from D1037
Patch By: temple
This was SVN commit r20496.
This allows replacing the common code with a library call in only one or
two hunks each.
On Archipelago move the random resources closer to the playerbase to
make the map more enjoyable.
Use default/skirmish templates for the docks on Islands/Migration and
the market on Polar Sea while at it.
Abort map generation if the dock placement failed.
Remove clForest dummy variable on Polar Sea following the removal of
references to map defined tileclasses in the library following
822e37f70c.
This was SVN commit r20476.
Stop listening to OnTrainingFinished and OnStructureBuild messages but
use OnOwnershipChanged messages. This fixes the defeat when only
promoted/upgrades/regi-hero units remain.
Add foundations to the conquest lists and make them visible on the
minimap.
Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1022
This was SVN commit r20471.
Use the rotateAround function from eb96b61954, refs #4845.
Freely randomize the river angle on Corinthian Isthmus following
4256744e26 and eb96b61954, refs #4855.
This was SVN commit r20469.
Remove the rmgen rotateCoordinates helper function from 4256744e26 and
clean the implementation of that commit, refs #4845, #4804.
Deepfreeze mapCenter vector from 5256d8497e used here to prevent
accidental overwrites with the mutating Vector2D functions, refs #4854.
This was SVN commit r20468.
In the Edge Seas variant, fix a wrong horizontal/vertical negation and
the direction of the riversize randomization.
Fix the wrong river location translation in that variant in e596ef6011,
refs #4851.
Prevent resource collisions on Unknown maps by adding back the large
territory marking (after the small territory marking prior to the
terrain generation).
Slightly improve river painting performance by not generating the
meandering of the second shoreline if that is outside of the map
boundary.
This was SVN commit r20465.
Replace complicated starting unit code with a call to
placeStartingEntities equal to df14c914e6.
Use distributePointsOnCircle to remove sin/cos/distance computations.
Add map center getter for rmgen code, refs #4854.
This was SVN commit r20463.