(svn r3773) Shove some semantics down ottd's throat by replacing ints and magic numbers by enums and some related changes

This commit is contained in:
tron
2006-03-06 13:11:08 +00:00
parent d793292778
commit f3fb21c96c
6 changed files with 79 additions and 62 deletions

View File

@@ -2,6 +2,7 @@
#include "stdafx.h"
#include "openttd.h"
#include "road_map.h"
#include "table/sprites.h"
#include "table/strings.h"
#include "functions.h"
@@ -72,7 +73,7 @@ static void BuildRoadOutsideStation(TileIndex tile, int direction)
static const byte _roadbits_by_dir[4] = {2,1,8,4};
tile += TileOffsByDir(direction);
// if there is a roadpiece just outside of the station entrance, build a connecting route
if (IsTileType(tile, MP_STREET) && !(_m[tile].m5 & 0x20)) {
if (IsTileType(tile, MP_STREET) && GetRoadType(tile) == ROAD_NORMAL) {
DoCommandP(tile, _roadbits_by_dir[direction], 0, NULL, CMD_BUILD_ROAD);
}
}