diff options
-rw-r--r-- | src/newgrf_railtype.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/newgrf_railtype.cpp b/src/newgrf_railtype.cpp index b76eb2aef..931f544e9 100644 --- a/src/newgrf_railtype.cpp +++ b/src/newgrf_railtype.cpp @@ -14,10 +14,13 @@ #include "newgrf_commons.h" #include "newgrf_railtype.h" #include "newgrf_spritegroup.h" +#include "core/bitmath_func.hpp" static uint32 RailTypeGetRandomBits(const ResolverObject *object) { - return 0; + TileIndex tile = object->u.routes.tile; + uint tmp = CountBits(tile + (TileX(tile) + TileY(tile)) * TILE_SIZE); + return GB(tmp, 0, 2); } static uint32 RailTypeGetTriggers(const ResolverObject *object) |