1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-02-02 09:04:29 +01:00

(svn r19646) [1.0] -Backport from trunk:

- Change: Log the _date and _date_fract in the desync log for saved games (r19638)
- Fix: Do not allow building cacti outside of the desert or rain forest trees outside of the rain forest area. This to prevent people from thinking planting rain forest trees makes the rain forest bigger and thus adds more place to build a lumber mill [FS#3728] (r19644, r19635, r19634)
- Fix: Industry generation failed for large maps and lots of industry types (r19643)
- Fix: Desync when taking over companies (r19636)
- Fix: Chat message caused glitch when rejoining a network game [FS#3757] (r19629)
This commit is contained in:
rubidium
2010-04-16 22:02:33 +00:00
parent 7c3487501c
commit 4fada121bd
12 changed files with 54 additions and 33 deletions

View File

@@ -57,6 +57,7 @@ uint32 DoRandom(int line, const char *file)
uint DoRandomRange(uint max, int line, const char *file)
{
assert(max <= UINT16_MAX);
return GB(DoRandom(line, file), 0, 16) * max >> 16;
}
#endif /* RANDOM_DEBUG */

View File

@@ -99,8 +99,9 @@ void SetRandomSeed(uint32 seed);
return _random.Next();
}
static FORCEINLINE uint32 RandomRange(uint16 max)
static FORCEINLINE uint32 RandomRange(uint max)
{
assert(max <= UINT16_MAX);
return _random.Next(max);
}
#endif