forked from github/server
avoid type conversion warning in VS2019
This commit is contained in:
parent
860fcfacbe
commit
1507090300
|
@ -151,9 +151,8 @@ static void use_default(rawmaterial * res, const region * r, int amount)
|
||||||
assert(res->amount > 0 && amount >= 0 && amount <= res->amount);
|
assert(res->amount > 0 && amount >= 0 && amount <= res->amount);
|
||||||
res->amount -= amount;
|
res->amount -= amount;
|
||||||
while (res->amount == 0) {
|
while (res->amount == 0) {
|
||||||
double modifier =
|
long rn = ((rng_int() % (SHIFT * 2 + 1)) - SHIFT) * ((rng_int() % (SHIFT * 2 + 1)) - SHIFT);
|
||||||
1.0 + ((rng_int() % (SHIFT * 2 + 1)) - SHIFT) * ((rng_int() % (SHIFT * 2 +
|
double modifier = 1.0 + rn / 10000.0;
|
||||||
1)) - SHIFT) / 10000.0;
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; r->terrain->production[i].type; ++i) {
|
for (i = 0; r->terrain->production[i].type; ++i) {
|
||||||
|
|
Loading…
Reference in New Issue