Areas proportional to the map radius are easier to comprehend than areas
proportional to the square with the map diameter for sides.
This was SVN commit r20905.
The height is only a concern to the random map script, not the rmgen
library, nor the gamesetup, nor the simulation.
Reveals the actual initial elevation to the random map script author
without looking up the JSON file.
Group and rename all height constants of random maps below the template
names.
Rename waterHeight to heightSeaGround to prevent confusion with the
actual waterlevel.
Remove useless paintTerrainBasedOnHeight calls on African Plains and
Polar Sea.
This was SVN commit r20904.
Lets the random map script decide which baseTerrain and baseHeight it
wants to use before initializing the map,
rather than painting what is in the JSON file, then changing ones mind
and painting something else on top of it.
This cleaner heightmap initialization incidentally addresses the
uninitialized border of the heightmap in that commit (excluding the
Unknown).
This was SVN commit r20900.
Summary: Improve binary security by enabling a hardening linker flag.
Test Plan:
Patch already used on Debian.
Tested locally by @Gallaecio as well.
Reviewed By: LudovicRousseau
Trac Tickets: #4894
Differential Revision: https://code.wildfiregames.com/D1123
This was SVN commit r20896.
Use it to replace the hacky resetTerrain rmgen2 function from 6d52a71d4a
and initHeight from 280a797620.
Highlights that createArea is the primary tool of rmgen, rather than
nested for-loops over the mapsize.
Neglect that the heightmap grid is one tile larger than the tilemap grid
for now.
This was SVN commit r20894.
Since it is the only map with stronghold placement where the mines are
placed facing away from the team center, this code should be moved to a
library eventually, refs #3851.
This was SVN commit r20891.
This way random map scripts can do vector math and pass the result to
library functions that do further vector math on them and leave shorter
code, refs #4845.
Pass tilegrid coordinates rather than percent numbers to the playerbase
functions too, refs #4939.
Some more mapCenter calls, refs #4854.
This was SVN commit r20882.
This allows creation of paths that are not linear nor sine-shaped like
the PathPlacer, refs #892.
To mimic the per-tile path elevation randomization on Deep Forest, use a
SmoothElevationPainter and it's randomization argument from 77f28c5a56.
Use vector algebra and the mapCenter getter, refs #4845, #4854.
This was SVN commit r20879.
Summary:
{F316877}
Often we'll have a large group of units that we want to move to a new
location, but if we do that by having them building a dropsite, then if
the building's finished before everyone gets there, units still en route
will start gathering near their current position instead of near the new
location.
Test Plan: Agree.
Reviewers: wraitii
Reviewed By: wraitii
Subscribers: wraitii, Vulcan
Differential Revision: https://code.wildfiregames.com/D1162
This was SVN commit r20876.
Pass vectors, refs #4845.
Pass tile sizes rather than percent numbers of the map, refs #4939.
Replace some water- and land-functions with more common
createArea+RectPlacer and paintTerrainBasedOnHeight calls.
Implement getMapBounds to make references easier to read, refs #4854
(and thus less error-prone, refs db9a52b94a).
Move height constants to the top of the files.
Fix Aegean Sea, English Channel and Danubius fadeWidth off by factor of
2 in 7d0cc59136.
Fix forgotton clWater in unknown_common of c74bd3425f and move that
createUnknownObjects call to common.
This was SVN commit r20871.
Move some capes to more explicit names of their functions
Correct some inversions inside the inheritance
Fix capes for chariots and elephants, it wouldn't work because the death
variants were not specified,
and instead of keeping the order like Parent : None Child 1 : Death 1
Child1Prop : Death1 it would randomly
select the animations hereby breaking the chain, and therefore the anim.
Differential Revision: https://code.wildfiregames.com/D1213
Patch By : s0600204
Completition by : Stan
Reviewed by : Stan
This was SVN commit r20870.
The abs caused a compiler error in that environment, because wchar_t is
unsigned on armhf, subtracting signed from unsigned results in unsigned
and std::abs does not define an unsigned variant.
Differential Revision: https://code.wildfiregames.com/D1122
Patch By: Peter Michael Green
Uploaded By: Ludovic
This was SVN commit r20869.
Fine-tune random map scripts if nomad mode is enabled by omitting gaia
attackers and vast voids.
Fix nomad units on the Unknown sometimes being stuck on mountains or
tiny islands, refs #3140.
Discussed with: bb
This was SVN commit r20866.
Should resolve current concern raised with 7aae697bc5.
(Until something better is done wrt default args and/or not having them,
or whatever.)
Refs D900, 7aae697bc5, #2944
This was SVN commit r20865.
Fix collisions of mines with trees and berries on Schwarzwald.
It can't achieve anything that a createArea or createObjectGroups call
with a HeightConstraint (6278f75a1f) or HeightPlacer (49194819f6,
24f02d97eb) can't achieve too,
while it can't perform many crucial tasks like testing for arbitrary
Constraints, using custom shapes determined by a Placer or limiting the
amount of entities,
thus the unconventional code is redundant, refs #4805, #3764.
This was SVN commit r20864.
Have some workarounds to mark tileclasses get rekt by this Placer.
Fix Hyrcanian Shores clHighlands class being painted on the entire
landarea rather than only the bottom 25% following 7d0cc59136.
This was SVN commit r20863.
Use a separate tileclass for the oasis.
Use the mapCenter getter, refs #4854 and move important height and
radius constants to the top.
This was SVN commit r20859.
Use constants instead of convoluting magic numbers
Use vector algebra and distributePointsOnCircle to determine the
locations of animals in the oasis, refs #4845.
This was SVN commit r20858.