-
-
Save spnda/2e59386afb6362d9eef1bb6129e2f1c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void TriggerRoadStopRandomisation(Station *st, TileIndex tile, RoadStopRandomTrigger trigger, CargoID cargo_type) | |
{ | |
if (GetTileType(tile) != MP_STATION) return; | |
if (st == nullptr) st = Station::GetByTile(tile); | |
SetBit(st->waiting_triggers, trigger); | |
// omitted | |
RoadStopResolverObject object(rss, BaseStation::GetByTile(tile), tile, road_rti, 0); | |
uint32 reseed = object.GetReseedSum(); | |
if (reseed != 0) { | |
reseed >>= 16; | |
/* Set individual tile random bits */ | |
st->random_bits &= ~reseed; | |
st->random_bits |= Random() & reseed; | |
SetStationTileRandomBits(tile, st->random_bits); | |
MarkTileDirtyByTile(tile); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment