author | rubidium |
Wed, 09 Jan 2008 21:05:03 +0000 | |
changeset 8732 | b18f578f7c16 |
parent 8627 | 448ebf3a8291 |
child 8750 | fdd6054e7bae |
permissions | -rw-r--r-- |
8587
6db234b2b897
(svn r11652) -Codechange: add the svn $ header for several files
smatz
parents:
8328
diff
changeset
|
1 |
/* $Id$ */ |
6db234b2b897
(svn r11652) -Codechange: add the svn $ header for several files
smatz
parents:
8328
diff
changeset
|
2 |
|
8137
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
3 |
#include "stdafx.h" |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
4 |
#include "openttd.h" |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
5 |
#include "rail_map.h" |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
6 |
#include "road_map.h" |
8598
14ae80fe4c8f
(svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents:
8587
diff
changeset
|
7 |
#include "road_internal.h" |
8137
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
8 |
#include "water_map.h" |
8732
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
9 |
#include "genworld.h" |
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
10 |
#include "player.h" |
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
11 |
#include "engine.h" |
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
12 |
#include "settings_type.h" |
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
13 |
#include "date_func.h" |
8137
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
14 |
|
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
15 |
bool IsPossibleCrossing(const TileIndex tile, Axis ax) |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
16 |
{ |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
17 |
return (IsTileType(tile, MP_RAILWAY) && |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
18 |
!HasSignals(tile) && |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
19 |
GetTrackBits(tile) == (ax == AXIS_X ? TRACK_BIT_Y : TRACK_BIT_X) && |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
20 |
GetTileSlope(tile, NULL) == SLOPE_FLAT); |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
21 |
} |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
22 |
|
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
23 |
RoadBits CleanUpRoadBits(const TileIndex tile, RoadBits org_rb) |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
24 |
{ |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
25 |
for (DiagDirection dir = DIAGDIR_BEGIN; dir < DIAGDIR_END; dir++) { |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
26 |
const TileIndex neighbor_tile = TileAddByDiagDir(tile, dir); |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
27 |
|
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
28 |
/* Get the Roadbit pointing to the neighbor_tile */ |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
29 |
const RoadBits target_rb = DiagDirToRoadBits(dir); |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
30 |
|
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
31 |
/* If the roadbit is in the current plan */ |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
32 |
if (org_rb & target_rb) { |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
33 |
bool connective = false; |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
34 |
const RoadBits mirrored_rb = MirrorRoadBits(target_rb); |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
35 |
|
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
36 |
switch (GetTileType(neighbor_tile)) { |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
37 |
/* Allways connective ones */ |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
38 |
case MP_CLEAR: case MP_TREES: |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
39 |
connective = true; |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
40 |
break; |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
41 |
|
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
42 |
/* The conditionaly connective ones */ |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
43 |
case MP_TUNNELBRIDGE: |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
44 |
case MP_STATION: |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
45 |
case MP_ROAD: { |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
46 |
const RoadBits neighbor_rb = GetAnyRoadBits(neighbor_tile, ROADTYPE_ROAD) | GetAnyRoadBits(neighbor_tile, ROADTYPE_TRAM); |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
47 |
|
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
48 |
/* Accept only connective tiles */ |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
49 |
connective = (neighbor_rb & mirrored_rb) || // Neighbor has got the fitting RoadBit |
8328
6909973c8359
(svn r11382) -Codechange: renamed COUNTBITS to CountBits, as it is no longer a macro (skidd13)
truelight
parents:
8137
diff
changeset
|
50 |
CountBits(neighbor_rb) == 1; // Neighbor has got only one Roadbit |
8137
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
51 |
|
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
52 |
} break; |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
53 |
|
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
54 |
case MP_RAILWAY: |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
55 |
connective = IsPossibleCrossing(neighbor_tile, DiagDirToAxis(dir)); |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
56 |
break; |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
57 |
|
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
58 |
case MP_WATER: |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
59 |
/* Check for real water tile */ |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
60 |
connective = !IsWater(neighbor_tile); |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
61 |
break; |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
62 |
|
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
63 |
/* The defentetly not connective ones */ |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
64 |
default: break; |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
65 |
} |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
66 |
|
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
67 |
/* If the neighbor tile is inconnective remove the planed road connection to it */ |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
68 |
if (!connective) org_rb ^= target_rb; |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
69 |
|
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
70 |
} |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
71 |
} |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
72 |
|
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
73 |
return org_rb; |
67a9579abd74
(svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff
changeset
|
74 |
} |
8732
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
75 |
|
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
76 |
bool HasRoadTypesAvail(const PlayerID p, const RoadTypes rts) |
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
77 |
{ |
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
78 |
RoadTypes avail_roadtypes; |
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
79 |
|
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
80 |
if (p == OWNER_TOWN || _game_mode == GM_EDITOR || IsGeneratingWorld()) { |
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
81 |
avail_roadtypes = ROADTYPES_ROAD; |
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
82 |
} else { |
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
83 |
if (!IsValidPlayer(p)) return false; |
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
84 |
avail_roadtypes = (RoadTypes)GetPlayer(p)->avail_roadtypes | ROADTYPES_ROAD; // road is available for always for everybody |
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
85 |
} |
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
86 |
return (rts & ~avail_roadtypes) == 0; |
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
87 |
} |
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
88 |
|
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
89 |
bool ValParamRoadType(const RoadType rt) |
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
90 |
{ |
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
91 |
return HasRoadTypesAvail(_current_player, RoadTypeToRoadTypes(rt)); |
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
92 |
} |
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
93 |
|
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
94 |
RoadTypes GetPlayerRoadtypes(PlayerID p) |
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
95 |
{ |
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
96 |
RoadTypes rt = ROADTYPES_NONE; |
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
97 |
|
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
98 |
for (EngineID i = 0; i != TOTAL_NUM_ENGINES; i++) { |
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
99 |
const Engine* e = GetEngine(i); |
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
100 |
const EngineInfo *ei = EngInfo(i); |
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
101 |
|
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
102 |
if (e->type == VEH_ROAD && HasBit(ei->climates, _opt.landscape) && |
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
103 |
(HasBit(e->player_avail, p) || _date >= e->intro_date + 365)) { |
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
104 |
SetBit(rt, HasBit(ei->misc_flags, EF_ROAD_TRAM) ? ROADTYPE_TRAM : ROADTYPE_ROAD); |
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
105 |
} |
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
106 |
} |
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
107 |
|
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
108 |
return rt; |
b18f578f7c16
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8627
diff
changeset
|
109 |
} |