(svn r1706) Implement ScaleByMapSize() and ScaleByMapSize1D()
These scale a number relative to the map size/circumference. Use them to scale the amount of map objects. Of course at the moment they return just the input, because there are no bigger/smaller maps yet.
This commit is contained in:
@@ -1036,8 +1036,9 @@ static const byte _num_initial_towns[3] = {
|
||||
|
||||
void GenerateTowns(void)
|
||||
{
|
||||
uint n;
|
||||
n = _num_initial_towns[_opt.diff.number_towns] + (Random()&7);
|
||||
uint n =
|
||||
ScaleByMapSize(_num_initial_towns[_opt.diff.number_towns] + (Random() & 7));
|
||||
|
||||
do CreateRandomTown(); while (--n);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user