mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-13 01:29:10 +00:00
Codechange: Don't use a magic number for the number of DiagDirections
This commit is contained in:
@@ -249,7 +249,7 @@ static TownDrawTileProc * const _town_draw_tile_procs[1] = {
|
||||
*/
|
||||
static inline DiagDirection RandomDiagDir()
|
||||
{
|
||||
return (DiagDirection)(3 & Random());
|
||||
return (DiagDirection)(RandomRange(DIAGDIR_END));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user