(svn r22635) -Fix: Correctly reseed random bits of industries and industry tiles.

This commit is contained in:
frosch
2011-07-04 20:37:20 +00:00
parent 8b18292a2e
commit 8930337aae
5 changed files with 74 additions and 17 deletions

View File

@@ -606,8 +606,9 @@ static void DoTriggerHouse(TileIndex tile, HouseTrigger trigger, byte base_rando
byte new_random_bits = Random();
byte random_bits = GetHouseRandomBits(tile);
random_bits &= ~object.reseed;
random_bits |= (first ? new_random_bits : base_random) & object.reseed;
uint32 reseed = object.GetReseedSum(); // The scope only affects triggers, not the reseeding
random_bits &= ~reseed;
random_bits |= (first ? new_random_bits : base_random) & reseed;
SetHouseRandomBits(tile, random_bits);
switch (trigger) {