summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-01-29 18:57:26 +0000
committerDarkvater <darkvater@openttd.org>2006-01-29 18:57:26 +0000
commit4e09974975ba47b755ac00b58aae880fa297e161 (patch)
treea71e925a12583a807b9e921fd125c8ae1b8e8721
parentbb49381cd3ce8c95e459d1f542fc15064d7b17ea (diff)
downloadopenttd-4e09974975ba47b755ac00b58aae880fa297e161.tar.xz
(svn r3472) - [PBS] Remove from trunk. Anyone interested can still find it in branch/pbs. This reverts revisions r3158, r3140, r3075, r2977, r2674, r2625, r2621, r2529, r2528, r2525, r2524, r2519, r2517, r2516, r2507, r2499. (in conjunction with Tron)
- The only change is that the nsignalsw.grf file is kept and that existing nightlies with PBS signals get those signals converted to combo-signals.
-rw-r--r--Makefile1
-rw-r--r--ai/trolly/pathfinder.c2
-rw-r--r--aystar.c4
-rw-r--r--aystar.h6
-rw-r--r--debug.c2
-rw-r--r--debug.h1
-rw-r--r--docs/landscape.html25
-rw-r--r--docs/landscape_grid.html14
-rw-r--r--lang/american.txt2
-rw-r--r--lang/brazilian_portuguese.txt2
-rw-r--r--lang/catalan.txt2
-rw-r--r--lang/czech.txt2
-rw-r--r--lang/danish.txt2
-rw-r--r--lang/dutch.txt2
-rw-r--r--lang/english.txt2
-rw-r--r--lang/estonian.txt2
-rw-r--r--lang/finnish.txt2
-rw-r--r--lang/french.txt2
-rw-r--r--lang/galician.txt2
-rw-r--r--lang/german.txt2
-rw-r--r--lang/hungarian.txt2
-rw-r--r--lang/icelandic.txt2
-rw-r--r--lang/italian.txt2
-rw-r--r--lang/norwegian.txt2
-rw-r--r--lang/polish.txt2
-rw-r--r--lang/portuguese.txt2
-rw-r--r--lang/romanian.txt2
-rw-r--r--lang/slovak.txt2
-rw-r--r--lang/spanish.txt2
-rw-r--r--lang/turkish.txt2
-rw-r--r--lang/unfinished/latvian.txt2
-rw-r--r--npf.c236
-rw-r--r--npf.h13
-rw-r--r--oldloader.c2
-rw-r--r--openttd.c45
-rw-r--r--openttd.dsp8
-rw-r--r--openttd.vcproj6
-rw-r--r--rail.h7
-rw-r--r--rail_cmd.c122
-rw-r--r--road_cmd.c19
-rw-r--r--roadveh_cmd.c4
-rw-r--r--saveload.c2
-rw-r--r--settings.c1
-rw-r--r--settings_gui.c1
-rw-r--r--ship_cmd.c2
-rw-r--r--station_cmd.c11
-rw-r--r--train_cmd.c216
-rw-r--r--tunnelbridge_cmd.c30
-rw-r--r--variables.h1
-rw-r--r--vehicle.c7
-rw-r--r--vehicle.h4
-rw-r--r--waypoint.c14
52 files changed, 90 insertions, 762 deletions
diff --git a/Makefile b/Makefile
index a9ce9f36c..9671e02ec 100644
--- a/Makefile
+++ b/Makefile
@@ -660,7 +660,6 @@ SRCS += openttd.c
SRCS += order_cmd.c
SRCS += order_gui.c
SRCS += pathfind.c
-SRCS += pbs.c
SRCS += player_gui.c
SRCS += players.c
SRCS += pool.c
diff --git a/ai/trolly/pathfinder.c b/ai/trolly/pathfinder.c
index 1d9d43ac3..79d1dfc53 100644
--- a/ai/trolly/pathfinder.c
+++ b/ai/trolly/pathfinder.c
@@ -107,8 +107,6 @@ AyStar *new_AyStar_AiPathFinder(int max_tiles_around, Ai_PathFinderInfo *PathFin
result->FoundEndNode = AyStar_AiPathFinder_FoundEndNode;
result->GetNeighbours = AyStar_AiPathFinder_GetNeighbours;
- result->BeforeExit = NULL;
-
result->free = AyStar_AiPathFinder_Free;
// Set some information
diff --git a/aystar.c b/aystar.c
index 9e53c7e8f..e42fe37d9 100644
--- a/aystar.c
+++ b/aystar.c
@@ -232,10 +232,6 @@ int AyStarMain_Main(AyStar *aystar) {
else if (r == AYSTAR_LIMIT_REACHED)
printf("[AyStar] Exceeded search_nodes, no path found\n");
#endif
-
- if (aystar->BeforeExit != NULL)
- aystar->BeforeExit(aystar);
-
if (r != AYSTAR_STILL_BUSY)
/* We're done, clean up */
aystar->clear(aystar);
diff --git a/aystar.h b/aystar.h
index a72f33056..6b2594033 100644
--- a/aystar.h
+++ b/aystar.h
@@ -98,11 +98,6 @@ typedef void AyStar_GetNeighbours(AyStar *aystar, OpenListNode *current);
*/
typedef void AyStar_FoundEndNode(AyStar *aystar, OpenListNode *current);
-/*
- * Is called when aystar ends it pathfinding, but before cleanup.
- */
-typedef void AyStar_BeforeExit(AyStar *aystar);
-
// For internal use, see aystar.c
typedef void AyStar_AddStartNode(AyStar *aystar, AyStarNode* start_node, uint g);
typedef int AyStar_Main(AyStar *aystar);
@@ -122,7 +117,6 @@ struct AyStar {
AyStar_GetNeighbours* GetNeighbours;
AyStar_EndNodeCheck* EndNodeCheck;
AyStar_FoundEndNode* FoundEndNode;
- AyStar_BeforeExit* BeforeExit;
/* These are completely untouched by AyStar, they can be accesed by
* the application specific routines to input and output data.
diff --git a/debug.c b/debug.c
index 73be30957..1acde287a 100644
--- a/debug.c
+++ b/debug.c
@@ -18,7 +18,6 @@ int _debug_ms_level;
int _debug_net_level;
int _debug_spritecache_level;
int _debug_oldloader_level;
-int _debug_pbs_level;
int _debug_ntp_level;
int _debug_npf_level;
@@ -51,7 +50,6 @@ typedef struct DebugLevel {
DEBUG_LEVEL(net),
DEBUG_LEVEL(spritecache),
DEBUG_LEVEL(oldloader),
- DEBUG_LEVEL(pbs),
DEBUG_LEVEL(ntp),
DEBUG_LEVEL(npf)
};
diff --git a/debug.h b/debug.h
index 8d9395cfb..71d0dcbd1 100644
--- a/debug.h
+++ b/debug.h
@@ -17,7 +17,6 @@
extern int _debug_net_level;
extern int _debug_spritecache_level;
extern int _debug_oldloader_level;
- extern int _debug_pbs_level;
extern int _debug_ntp_level;
extern int _debug_npf_level;
#endif
diff --git a/docs/landscape.html b/docs/landscape.html
index a11474ee6..92fed219e 100644
--- a/docs/landscape.html
+++ b/docs/landscape.html
@@ -103,13 +103,12 @@ m5 bit 7 clear: railway track
<li>m2 bits 7..4: bit clear = signal shows red; same bits as in m3</li>
<li>OpenTTD bits in m4:
<table>
-<tr><td nowrap valign=top>bits 2..0: </td><td align=left>type of signal:</td></tr>
-<tr><td nowrap valign=top><tt>000</tt>: </td><td align=left>normal signals</td></tr>
-<tr><td nowrap valign=top><tt>001</tt>: </td><td align=left>pre-signals</td></tr>
-<tr><td nowrap valign=top><tt>010</tt>: </td><td align=left>exit-signals</td></tr>
-<tr><td nowrap valign=top><tt>011</tt>: </td><td align=left>combo-signals</td></tr>
-<tr><td nowrap valign=top><tt>100</tt>: </td><td align=left>PBS signals</td></tr>
-<tr><td nowrap valign=top>bit 3: </td><td align=left>set = semaphore signals, clear = light signals</td></tr>
+<tr><td nowrap valign=top>bits 1..0: </td><td align=left>type of signal:</td></tr>
+<tr><td nowrap valign=top><tt>00</tt>: </td><td align=left>normal signals</td></tr>
+<tr><td nowrap valign=top><tt>01</tt>: </td><td align=left>pre-signals</td></tr>
+<tr><td nowrap valign=top><tt>10</tt>: </td><td align=left>exit-signals</td></tr>
+<tr><td nowrap valign=top><tt>11</tt>: </td><td align=left>combo-signals</td></tr>
+<tr><td nowrap valign=top>bit 2: </td><td align=left>set = semaphore signals, clear = light signals</td></tr>
</table></li>
</ul></li>
<li>m1: <a href="#OwnershipInfo">owner</a> of the track
@@ -131,11 +130,6 @@ m5 bit 7 clear: railway track
<tr><td nowrap valign=top><tt>C</tt>&nbsp; </td><td align=left>on snow or desert</td></tr>
</table></li>
<li>m3 bits 0..3 = <a name="TrackType">track type</a>: <tt>0</tt> - conventional railway, <tt>1</tt> - monorail, <tt>2</tt> - maglev
-<li>m4 bits 4..7 = Pbs reserved status:
-<table>
-<tr><td nowrap valign=top><tt>bits 4..6</tt>&nbsp; </td><td align=left>'Track'number of reserved track + 1, if this is zero it means nothing is reserved on this tile</td></tr>
-<tr><td nowrap valign=top><tt>bit 7</tt>&nbsp; </td><td align=left>If this is set, then the opposite track ('Track'number^1) is also reserved</td></tr>
-</table></li>
</ul>
m5 bits 7 and 6 set: railway depot / checkpoints
<ul>
@@ -149,7 +143,6 @@ m5 bits 7 and 6 set: railway depot / checkpoints
<li>m2: For waypoints, index into the array of waypoints.</li>
<li>m3 bits 0..3 = <a href="#TrackType">track type</a></li>
<li>m3 bit 4 = use custom sprite (valid only for the checkpoint)</li>
-<li>m3 bit 6 = track on this tile is reserved by pbs</li>
<li>m4 bits 0..3 = ground type, as per m2 bits 0..3 for railway tiles.</li>
</ul>
</td></tr>
@@ -174,7 +167,6 @@ m5 bit 4 set, bits 7..5 clear: level crossing
<ul>
<li>m5 bit 3: clear - road in the X direction, set - road in the Y direction (railway track always perpendicular)</li>
<li>m5 bit 2: set if crossing lights are on</li>
-<li>m5 bit 0: set if rail track is reserved by pbs</li>
<li>m1: <a href="#OwnershipInfo">owner</a> of the railway track</li>
<li>m2: Index into the array of towns, 0 for non-town roads</li>
<li>m3 bits 0..7: <a href="#OwnershipInfo">owner</a> of the road</li>
@@ -390,7 +382,6 @@ exit towards: <tt>47</tt> - NE, <tt>48</tt> - SE, <tt>49</tt> - SW, <tt>4A</tt>
<li>m2: index into the <a href="#_StationArray">array of stations</a></li>
<li>m3 bits 0..3: <a href="#TrackType">track type</a> for railway stations, must be 0 for all the other stations</li>
<li>m3 bit 4 = use custom sprite (valid only railway stations FOR NOW)</li>
-<li>m3 bit 6 set = track is reserved by pbs (railway stations only)</li>
<li>m4 = custom station id</li>
</ul>
</td></tr>
@@ -561,8 +552,6 @@ m5 bits 7..4 clear: tunnel entrance/exit
<li>m1: <a href="#OwnershipInfo">owner</a> of the tunnel</li>
<li>m3 bits 3..0 = <a href="#TrackType">track type</a> for railway tunnel, must be 0 for road tunnel</li>
<li>m4 bit 7 set = on snow or desert</li>
-<li>m4 bit 0 set = track with 'Track'number 0 is reserved by pbs</li>
-<li>m4 bit 1 set = track with 'Track'number 1 is reserved by pbs</li>
</ul>
m5 bit 7 set: bridge
<ul><li>
@@ -605,8 +594,6 @@ m5 bit 5 set:
<tr><td nowrap valign=top><tt>A</tt>&nbsp; </td><td align=center>200</td><td align=left>tubular, steel</td></tr>
</table></li>
<li>m4 bit 7 set = on snow or desert</li>
-<li>m4 bit 0 set = track with 'Track'number 0 is reserved by pbs</li>
-<li>m4 bit 1 set = track with 'Track'number 1 is reserved by pbs</li>
</ul>
</td></tr>
diff --git a/docs/landscape_grid.html b/docs/landscape_grid.html
index 2a062b76f..5ea3a9980 100644
--- a/docs/landscape_grid.html
+++ b/docs/landscape_grid.html
@@ -70,7 +70,7 @@ the array so you can quickly see what is used and what is not.
<td class="bits">XXXX XXXX</td>
<td class="bits"><span class="free">OOOO OOOO</span> XXXX XXXX</td>
<td class="bits">XXXX XXXX</td>
- <td class="bits">XXXX XXXX</td>
+ <td class="bits"><span class="free">OOOO O</span>XXX</td>
<td class="bits">XXXX XXXX</td>
<td class="bits">XXXX XXXX</td>
</tr>
@@ -78,7 +78,7 @@ the array so you can quickly see what is used and what is not.
<td class="caption">depot</td>
<td class="bits">-inherit-</td>
<td class="bits"><span class="free">OOOO OOOO OOOO OOOO</span></td>
- <td class="bits"><span class="free">O</span>X<span class="free">OO</span> XXXX</td>
+ <td class="bits"><span class="free">OOOO</span> XXXX</td>
<td class="bits"><span class="free">OOOO</span> XXXX</td>
<td class="bits">-inherit-</td>
<td class="bits">XX<span class="free">OO O</span>XXX</td>
@@ -87,7 +87,7 @@ the array so you can quickly see what is used and what is not.
<td class="caption">waypoint</td>
<td class="bits">-inherit-</td>
<td class="bits">XXXX XXXX XXXX XXXX</td>
- <td class="bits"><span class="free">O</span>X<span class="free">O</span>X XXXX</td>
+ <td class="bits"><span class="free">OOO</span>X XXXX</td>
<td class="bits"><span class="free">OOOO</span> XXXX</td>
<td class="bits">-inherit-</td>
<td class="bits">XX<span class="free">OO O</span>XXX</td>
@@ -109,7 +109,7 @@ the array so you can quickly see what is used and what is not.
<td class="bits">XXXX XXXX</td>
<td class="bits">XXXX XXXX</td>
<td class="bits">-inherit-</td>
- <td class="bits">XXXX XX<span class="free">O</span>X</td>
+ <td class="bits">XXXX XX<span class="free">OO</span></td>
</tr>
<tr>
<td class="caption">road depot</td>
@@ -145,7 +145,7 @@ the array so you can quickly see what is used and what is not.
<td class="caption">station</td>
<td class="bits">XXXX XXXX</td>
<td class="bits">XXXX XXXX XXXX XXXX</td>
- <td class="bits"><span class="free">O</span>X<span class="free">O</span>X XXXX</td>
+ <td class="bits"><span class="free">OOO</span>X XXXX</td>
<td class="bits">XXXX XXXX</td>
<td class="bits">XXXX XXXX</td>
<td class="bits">XXXX XXXX</td>
@@ -221,7 +221,7 @@ the array so you can quickly see what is used and what is not.
<td class="bits">XXXX XXXX</td>
<td class="bits"><span class="free">OOOO OOOO OOOO OOOO</span></td>
<td class="bits"><span class="free">OOOO</span> XXXX</td>
- <td class="bits">X<span class="free">OOO OO</span>XX</td>
+ <td class="bits">X<span class="free">OOO OOOO</span></td>
<td class="bits">XXXX XXXX</td>
<td class="bits">XXXX XXXX</td>
</tr>
@@ -230,7 +230,7 @@ the array so you can quickly see what is used and what is not.
<td class="bits">XXXX XXXX</td>
<td class="bits"><span class="free">OOOO OOOO</span> <span class="abuse">XXXX XXXX</span></td>
<td class="bits">XXXX XXXX</td>
- <td class="bits">X<span class="free">OOO OO</span>XX</td>
+ <td class="bits">X<span class="free">OOO OOOO</span></td>
<td class="bits">XXXX XXXX</td>
<td class="bits">XXXX XXXX</td>
</tr>
diff --git a/lang/american.txt b/lang/american.txt
index 940d41305..d80e10134 100644
--- a/lang/american.txt
+++ b/lang/american.txt
@@ -1020,7 +1020,6 @@ STR_CONFIG_PATCHES_ENDING_DATE :{LTBLUE}End gam
STR_CONFIG_PATCHES_SMOOTH_ECONOMY :{LTBLUE}Enable smooth economy (more, smaller changes)
STR_CONFIG_PATCHES_ALLOW_SHARES :{LTBLUE}Allow buying shares from other companies
STR_CONFIG_PATCHES_DRAG_SIGNALS_DENSITY :{LTBLUE}When dragging place signals every: {ORANGE}{STRING} tile(s)
-STR_CONFIG_AUTO_PBS_PLACEMENT :{LTBLUE}Allow automatic placement of pbs signals: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS :{LTBLUE}Position of main toolbar: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS_LEFT :Left
STR_CONFIG_PATCHES_TOOLBAR_POS_CENTER :Centre
@@ -1429,7 +1428,6 @@ STR_RAILROAD_TRACK_WITH_NORMAL_SIGNALS :Railroad track
STR_RAILROAD_TRACK_WITH_PRESIGNALS :Railroad track with pre-signals
STR_RAILROAD_TRACK_WITH_EXITSIGNALS :Railroad track with exit-signals
STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :Railroad track with combo-signals
-STR_RAILROAD_TRACK_WITH_PBSSIGNALS :Railroad track with pbs-signals
diff --git a/lang/brazilian_portuguese.txt b/lang/brazilian_portuguese.txt
index b3c4e31b6..b8d90c21e 100644
--- a/lang/brazilian_portuguese.txt
+++ b/lang/brazilian_portuguese.txt
@@ -1030,7 +1030,6 @@ STR_CONFIG_PATCHES_ENDING_DATE :{LTBLUE}Termina
STR_CONFIG_PATCHES_SMOOTH_ECONOMY :{LTBLUE}Ativar economia regular (alterações menores)
STR_CONFIG_PATCHES_ALLOW_SHARES :{LTBLUE}Permite comprar ações de outras companhias
STR_CONFIG_PATCHES_DRAG_SIGNALS_DENSITY :{LTBLUE}Ao arrastar colocar sinais a cada: {ORANGE}{STRING} quadrado(s)
-STR_CONFIG_AUTO_PBS_PLACEMENT :{LTBLUE}Permitir colocação automática de sinais PBS: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS :{LTBLUE}Posição da barra de ferramentas principal: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS_LEFT :Esquerda
STR_CONFIG_PATCHES_TOOLBAR_POS_CENTER :Centro
@@ -1438,7 +1437,6 @@ STR_RAILROAD_TRACK_WITH_NORMAL_SIGNALS :Ferrovia com si
STR_RAILROAD_TRACK_WITH_PRESIGNALS :Ferrovia com pre-sinais
STR_RAILROAD_TRACK_WITH_EXITSIGNALS :Ferrovia com sinais de saída
STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :Ferrovia com sinais combinados
-STR_RAILROAD_TRACK_WITH_PBSSIGNALS :Ferrovia com sinalização PBS
diff --git a/lang/catalan.txt b/lang/catalan.txt
index 2ff58ce57..dd9707545 100644
--- a/lang/catalan.txt
+++ b/lang/catalan.txt
@@ -1029,7 +1029,6 @@ STR_CONFIG_PATCHES_ENDING_DATE :{LTBLUE}Fi del
STR_CONFIG_PATCHES_SMOOTH_ECONOMY :{LTBLUE}Activar economia suau (més canvis però més petits)
STR_CONFIG_PATCHES_ALLOW_SHARES :{LTBLUE}Permetre comprar participadions d'altres empreses
STR_CONFIG_PATCHES_DRAG_SIGNALS_DENSITY :{LTBLUE}En arrosegant, sitúa senyals cada: {ORANGE}{STRING} quadre(s)
-STR_CONFIG_AUTO_PBS_PLACEMENT :{LTBLUE}Permetre situacio automatica de senyals pbs: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS :{LTBLUE}Posició de la barra d'eines principal: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS_LEFT :Esquerra
STR_CONFIG_PATCHES_TOOLBAR_POS_CENTER :Centre
@@ -1436,7 +1435,6 @@ STR_RAILROAD_TRACK_WITH_NORMAL_SIGNALS :Vía de tren amb
STR_RAILROAD_TRACK_WITH_PRESIGNALS :Vía de tren amb pre-senyals
STR_RAILROAD_TRACK_WITH_EXITSIGNALS :Vía de tren amb senyals de sortida
STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :Vía de tren amb senyals combinades
-STR_RAILROAD_TRACK_WITH_PBSSIGNALS :Via de tren amb senyals pbs
diff --git a/lang/czech.txt b/lang/czech.txt
index ee9fc5f82..b91ba4b63 100644
--- a/lang/czech.txt
+++ b/lang/czech.txt
@@ -1085,7 +1085,6 @@ STR_CONFIG_PATCHES_ENDING_DATE :{LTBLUE}Ukoncit
STR_CONFIG_PATCHES_SMOOTH_ECONOMY :{LTBLUE}Plynulé zmeny ekonomiky (více men¨ích zmen)
STR_CONFIG_PATCHES_ALLOW_SHARES :{LTBLUE}Povolit kupování podílu z ostatních spolecnosti
STR_CONFIG_PATCHES_DRAG_SIGNALS_DENSITY :{LTBLUE}Pri ta¸ení umistovat signály ka¸dých(é): {ORANGE}{STRING} dilku(y)
-STR_CONFIG_AUTO_PBS_PLACEMENT :{LTBLUE}Povolit automatické pokládání PBS signalu: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS :{LTBLUE}Umisteni hlavní li¨ty: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS_LEFT :vlevo
STR_CONFIG_PATCHES_TOOLBAR_POS_CENTER :uprostred
@@ -1492,7 +1491,6 @@ STR_RAILROAD_TRACK_WITH_NORMAL_SIGNALS :Zeleznicni trat
STR_RAILROAD_TRACK_WITH_PRESIGNALS :Zeleznicni trat s presignály
STR_RAILROAD_TRACK_WITH_EXITSIGNALS :Zeleznicni trat s výstupními signály
STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :Zeleznicni trat s kombinovanými signály
-STR_RAILROAD_TRACK_WITH_PBSSIGNALS :Koleje s PBS signály
diff --git a/lang/danish.txt b/lang/danish.txt
index 732128ae6..42b28fb5d 100644
--- a/lang/danish.txt
+++ b/lang/danish.txt
@@ -1025,7 +1025,6 @@ STR_CONFIG_PATCHES_ENDING_DATE :{LTBLUE}Afslut
STR_CONFIG_PATCHES_SMOOTH_ECONOMY :{LTBLUE}Aktiver rolig økonomi (flere små ændringer)
STR_CONFIG_PATCHES_ALLOW_SHARES :{LTBLUE}Tillad at købe aktier i andre selskaber
STR_CONFIG_PATCHES_DRAG_SIGNALS_DENSITY :{LTBLUE}Ved trækning placer signal hvert: {ORANGE}{STRING} felt
-STR_CONFIG_AUTO_PBS_PLACEMENT :{LTBLUE}Tillad automatisk opsætning af pbs signaler: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS :{LTBLUE}Placering af værktøjslinie: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS_LEFT :Venstre
STR_CONFIG_PATCHES_TOOLBAR_POS_CENTER :Center
@@ -1432,7 +1431,6 @@ STR_RAILROAD_TRACK_WITH_NORMAL_SIGNALS :Togskinner med
STR_RAILROAD_TRACK_WITH_PRESIGNALS :Togskinner med indkørselssignaler
STR_RAILROAD_TRACK_WITH_EXITSIGNALS :Togskinner med udkørselssignaler
STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :Togskinner med kombineret ind- og udkørselssignaler
-STR_RAILROAD_TRACK_WITH_PBSSIGNALS :Togskinner med pbs signaler
diff --git a/lang/dutch.txt b/lang/dutch.txt
index 1bcf2e6c0..336bb1978 100644
--- a/lang/dutch.txt
+++ b/lang/dutch.txt
@@ -1028,7 +1028,6 @@ STR_CONFIG_PATCHES_ENDING_DATE :{LTBLUE}Stop sp
STR_CONFIG_PATCHES_SMOOTH_ECONOMY :{LTBLUE}Vloeiende economie inschakelen (meer, kleinere veranderingen)
STR_CONFIG_PATCHES_ALLOW_SHARES :{LTBLUE}Sta het kopen van aandelen toe
STR_CONFIG_PATCHES_DRAG_SIGNALS_DENSITY :{LTBLUE}Bij slepen, plaats seinen elke: {ORANGE}{STRING} tegel(s)
-STR_CONFIG_AUTO_PBS_PLACEMENT :{LTBLUE}Sta automatische plaatsing van PBS-seinen toe: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS :{LTBLUE}Positie van hoofd knoppenbalk: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS_LEFT :Links
STR_CONFIG_PATCHES_TOOLBAR_POS_CENTER :Midden
@@ -1438,7 +1437,6 @@ STR_RAILROAD_TRACK_WITH_NORMAL_SIGNALS :Spoor met norma
STR_RAILROAD_TRACK_WITH_PRESIGNALS :Spoor met voorseinen
STR_RAILROAD_TRACK_WITH_EXITSIGNALS :Spoor met uitgangseinen
STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :Spoor met combinatieseinen
-STR_RAILROAD_TRACK_WITH_PBSSIGNALS :Spoor met pbs-seinen
diff --git a/lang/english.txt b/lang/english.txt
index d8061727c..1ec1a7d1d 100644
--- a/lang/english.txt
+++ b/lang/english.txt
@@ -1030,7 +1030,6 @@ STR_CONFIG_PATCHES_ENDING_DATE :{LTBLUE}End gam
STR_CONFIG_PATCHES_SMOOTH_ECONOMY :{LTBLUE}Enable smooth economy (more, smaller changes)
STR_CONFIG_PATCHES_ALLOW_SHARES :{LTBLUE}Allow buying shares from other companies
STR_CONFIG_PATCHES_DRAG_SIGNALS_DENSITY :{LTBLUE}When dragging, place signals every: {ORANGE}{STRING1} tile(s)
-STR_CONFIG_AUTO_PBS_PLACEMENT :{LTBLUE}Allow automatic placement of pbs signals: {ORANGE}{STRING1}
STR_CONFIG_PATCHES_TOOLBAR_POS :{LTBLUE}Position of main toolbar: {ORANGE}{STRING1}
STR_CONFIG_PATCHES_TOOLBAR_POS_LEFT :Left
STR_CONFIG_PATCHES_TOOLBAR_POS_CENTER :Centre
@@ -1445,7 +1444,6 @@ STR_RAILROAD_TRACK_WITH_NORMAL_SIGNALS :Railway track w
STR_RAILROAD_TRACK_WITH_PRESIGNALS :Railway track with pre-signals
STR_RAILROAD_TRACK_WITH_EXITSIGNALS :Railway track with exit-signals
STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :Railway track with combo-signals
-STR_RAILROAD_TRACK_WITH_PBSSIGNALS :Railway track with pbs-signals
diff --git a/lang/estonian.txt b/lang/estonian.txt
index f2337e0da..062b75ef2 100644
--- a/lang/estonian.txt
+++ b/lang/estonian.txt
@@ -1028,7 +1028,6 @@ STR_CONFIG_PATCHES_ENDING_DATE :{LTBLUE}Mäng lõ
STR_CONFIG_PATCHES_SMOOTH_ECONOMY :{LTBLUE}Luba sujuv majandus (väiksemad muutused)
STR_CONFIG_PATCHES_ALLOW_SHARES :{LTBLUE}Luba teiste ettevõtete aktsiate ostmine
STR_CONFIG_PATCHES_DRAG_SIGNALS_DENSITY :{LTBLUE}Venitades paigutatud signaaltulede tihedus: {ORANGE}{STRING} ühik(ut)
-STR_CONFIG_AUTO_PBS_PLACEMENT :{LTBLUE}Luba automaatset pbs signaalide panemist: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS :{LTBLUE}Tööriistariba asukoht: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS_LEFT :Vasakul
STR_CONFIG_PATCHES_TOOLBAR_POS_CENTER :Keskel
@@ -1434,7 +1433,6 @@ STR_RAILROAD_TRACK_WITH_NORMAL_SIGNALS :Raudtee tavalis
STR_RAILROAD_TRACK_WITH_PRESIGNALS :Raudtee eel-signaalidega
STR_RAILROAD_TRACK_WITH_EXITSIGNALS :Raudtee väljumis-signaalidega
STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :Raudtee kombo-signaalidega
-STR_RAILROAD_TRACK_WITH_PBSSIGNALS :Raudtee koos pbs signaalidega
diff --git a/lang/finnish.txt b/lang/finnish.txt
index 1de360d0a..114649155 100644
--- a/lang/finnish.txt
+++ b/lang/finnish.txt
@@ -1025,7 +1025,6 @@ STR_CONFIG_PATCHES_ENDING_DATE :{LTBLUE}Lopetus
STR_CONFIG_PATCHES_SMOOTH_ECONOMY :{LTBLUE}Tasainen talous (enemmän pieniä muutoksia)
STR_CONFIG_PATCHES_ALLOW_SHARES :{LTBLUE}Osakkeiden ostaminen yhtiöistä
STR_CONFIG_PATCHES_DRAG_SIGNALS_DENSITY :{LTBLUE}Vedettäessä aseta opastimien väleiksi: {ORANGE}{STRING} ruutu(a)
-STR_CONFIG_AUTO_PBS_PLACEMENT :{LTBLUE}Salli kulkutieopastimien automaattinen sijoitus: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS :{LTBLUE}Päätyökalupalkin sijainti: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS_LEFT :vasen
STR_CONFIG_PATCHES_TOOLBAR_POS_CENTER :keskellä
@@ -1432,7 +1431,6 @@ STR_RAILROAD_TRACK_WITH_NORMAL_SIGNALS :Rautatie tavall
STR_RAILROAD_TRACK_WITH_PRESIGNALS :Rautatie esiopastimin
STR_RAILROAD_TRACK_WITH_EXITSIGNALS :Rautatie poistumisopastimin
STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :Rautatie yhdistetyin opastimin
-STR_RAILROAD_TRACK_WITH_PBSSIGNALS :Rautatie kulkutieopastimin
diff --git a/lang/french.txt b/lang/french.txt
index 53e670b9d..bed5291bd 100644
--- a/lang/french.txt
+++ b/lang/french.txt
@@ -1031,7 +1031,6 @@ STR_CONFIG_PATCHES_ENDING_DATE :{LTBLUE}Date de
STR_CONFIG_PATCHES_SMOOTH_ECONOMY :{LTBLUE}Permettre une économie stable (plus de petits changements)
STR_CONFIG_PATCHES_ALLOW_SHARES :{LTBLUE}Permettre d'acheter des actions d'autres compagnies
STR_CONFIG_PATCHES_DRAG_SIGNALS_DENSITY :{LTBLUE}Espacements des signaux en mode drag & drop : {ORANGE}{STRING} case(s)
-STR_CONFIG_AUTO_PBS_PLACEMENT :{LTBLUE}Permettre pose automatique signaux PBS: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS :{LTBLUE}Position de la barre d'outils principale: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS_LEFT :À gauche
STR_CONFIG_PATCHES_TOOLBAR_POS_CENTER :Centrée
@@ -1439,7 +1438,6 @@ STR_RAILROAD_TRACK_WITH_NORMAL_SIGNALS :Rails avec des
STR_RAILROAD_TRACK_WITH_PRESIGNALS :Rails avec des pré-signaux
STR_RAILROAD_TRACK_WITH_EXITSIGNALS :Rails avec des signaux de sortie
STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :Rails avec des signaux combinés
-STR_RAILROAD_TRACK_WITH_PBSSIGNALS :Rails avec des signaux PBS
diff --git a/lang/galician.txt b/lang/galician.txt
index c8f6cc472..9fabddb08 100644
--- a/lang/galician.txt
+++ b/lang/galician.txt
@@ -1018,7 +1018,6 @@ STR_CONFIG_PATCHES_ENDING_DATE :{LTBLUE}Termina
STR_CONFIG_PATCHES_SMOOTH_ECONOMY :{LTBLUE}Habilita-la economía "suave"(máis cambios, pero máis pequenos)
STR_CONFIG_PATCHES_ALLOW_SHARES :{LTBLUE}Permiti-la compra de accións por outras compañías
STR_CONFIG_PATCHES_DRAG_SIGNALS_DENSITY :{LTBLUE}Cando se arrastre, colocar siniais cada: {ORANGE}{STRING} cadrado(s)
-STR_CONFIG_AUTO_PBS_PLACEMENT :{LTBLUE}Permiti-lo emprazamento automático de sinais pbs: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS :{LTBLUE}Posición da barra de ferramentas principal: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS_LEFT :Esquerda
STR_CONFIG_PATCHES_TOOLBAR_POS_CENTER :Centro
@@ -1423,7 +1422,6 @@ STR_RAILROAD_TRACK_WITH_NORMAL_SIGNALS :Vía de ferrocar
STR_RAILROAD_TRACK_WITH_PRESIGNALS :Vía de ferrocarril con pre-sinais
STR_RAILROAD_TRACK_WITH_EXITSIGNALS :vía de ferrocarril con sinais de saída
STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :Via de ferrocarril con sinais combinados
-STR_RAILROAD_TRACK_WITH_PBSSIGNALS :Vía de ferrocarril con sinais pbs
diff --git a/lang/german.txt b/lang/german.txt
index 9adb884e7..f4b98feb3 100644
--- a/lang/german.txt
+++ b/lang/german.txt
@@ -1031,7 +1031,6 @@ STR_CONFIG_PATCHES_ENDING_DATE :{LTBLUE}Spiel b
STR_CONFIG_PATCHES_SMOOTH_ECONOMY :{LTBLUE}Feinere Wirtschaft aktivieren (mehrere, kleinere Veränderungen)
STR_CONFIG_PATCHES_ALLOW_SHARES :{LTBLUE}Erlaube Anteile an anderen Firmen zu kaufen
STR_CONFIG_PATCHES_DRAG_SIGNALS_DENSITY :{LTBLUE}Errichte Signale alle {ORANGE}{STRING} Felder beim Ziehen mit der Maus
-STR_CONFIG_AUTO_PBS_PLACEMENT :{LTBLUE}Erlaube automatische Errichtung von Fahrstraßen-Signalen: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS :{LTBLUE}Position der Werkzeugleiste: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS_LEFT :Links
STR_CONFIG_PATCHES_TOOLBAR_POS_CENTER :Mitte
@@ -1441,7 +1440,6 @@ STR_RAILROAD_TRACK_WITH_NORMAL_SIGNALS :Gleis mit norma
STR_RAILROAD_TRACK_WITH_PRESIGNALS :Gleis mit Vorsignalen
STR_RAILROAD_TRACK_WITH_EXITSIGNALS :Gleis mit Ausfahrtsignalen
STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :Gleis mit kombinierten Vor-/Ausfahrtsignalen
-STR_RAILROAD_TRACK_WITH_PBSSIGNALS :Gleise mit Fahrstraßen-Signalen
diff --git a/lang/hungarian.txt b/lang/hungarian.txt
index 593fcb2a7..546009fe4 100644
--- a/lang/hungarian.txt
+++ b/lang/hungarian.txt
@@ -1092,7 +1092,6 @@ STR_CONFIG_PATCHES_ENDING_DATE :{LTBLUE}Játék b
STR_CONFIG_PATCHES_SMOOTH_ECONOMY :{LTBLUE}Egyenletes gazdaság (több, kisebb változás)
STR_CONFIG_PATCHES_ALLOW_SHARES :{LTBLUE}Másik cégekbõl részvényt lehet vásárolni
STR_CONFIG_PATCHES_DRAG_SIGNALS_DENSITY :{LTBLUE}Amikor megragadom helyezzen lámpákat minden {ORANGE}{STRING}. mezõre
-STR_CONFIG_AUTO_PBS_PLACEMENT :{LTBLUE}Automatikus PBS (intelligens jelzõcsoport) létrehozás: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS :{LTBLUE}A fõ eszközsor helye: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS_LEFT :Balra
STR_CONFIG_PATCHES_TOOLBAR_POS_CENTER :Középen
@@ -1501,7 +1500,6 @@ STR_RAILROAD_TRACK_WITH_NORMAL_SIGNALS :Vasúti sin szem
STR_RAILROAD_TRACK_WITH_PRESIGNALS :Vasúti sin elõrejelzõ szemaforral
STR_RAILROAD_TRACK_WITH_EXITSIGNALS :Vasúti sin kijáratjelzõ szemaforral
STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :Vasúti sin vegyes szemaforral
-STR_RAILROAD_TRACK_WITH_PBSSIGNALS :Vasúti sín intelligens jelzõkkel
diff --git a/lang/icelandic.txt b/lang/icelandic.txt
index 34f6cf5e6..a0e748194 100644
--- a/lang/icelandic.txt
+++ b/lang/icelandic.txt
@@ -1025,7 +1025,6 @@ STR_CONFIG_PATCHES_ENDING_DATE :{LTBLUE}Enda le
STR_CONFIG_PATCHES_SMOOTH_ECONOMY :{LTBLUE}Virkja jafnan efnahag (fleiri og minni breytingar)
STR_CONFIG_PATCHES_ALLOW_SHARES :{LTBLUE}Leyfa hlutabréfakaup í öðrum fyrirtækjum
STR_CONFIG_PATCHES_DRAG_SIGNALS_DENSITY :{LTBLUE}Þegar dregið er, setja skilti á: {ORANGE}{STRING} hvern reit
-STR_CONFIG_AUTO_PBS_PLACEMENT :{LTBLUE}Leyfa sjálfvirka staðsetningu pbs lestarljósa: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS :{LTBLUE}Staðsetning tækjasláar: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS_LEFT :Vinstri
STR_CONFIG_PATCHES_TOOLBAR_POS_CENTER :Miðjað
@@ -1432,7 +1431,6 @@ STR_RAILROAD_TRACK_WITH_NORMAL_SIGNALS :Lestarteinn með
STR_RAILROAD_TRACK_WITH_PRESIGNALS :Lestarteinn með forljósum
STR_RAILROAD_TRACK_WITH_EXITSIGNALS :Lestarteinn með útljósum
STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :Lestarteinn með samljósum
-STR_RAILROAD_TRACK_WITH_PBSSIGNALS :Lestarteinn með pbs ljósi
diff --git a/lang/italian.txt b/lang/italian.txt
index 5573be7ad..1f3a8b7af 100644
--- a/lang/italian.txt
+++ b/lang/italian.txt
@@ -1029,7 +1029,6 @@ STR_CONFIG_PATCHES_ENDING_DATE :{LTBLUE}Conclud
STR_CONFIG_PATCHES_SMOOTH_ECONOMY :{LTBLUE}Abilita nuova economia stabile (diverse piccole modifiche)
STR_CONFIG_PATCHES_ALLOW_SHARES :{LTBLUE}Permetti l'acquisto di azioni da altre compagnie
STR_CONFIG_PATCHES_DRAG_SIGNALS_DENSITY :{LTBLUE}Trascinando il cursore costruisci i semafori ogni: {ORANGE}{STRING} quadrato/i
-STR_CONFIG_AUTO_PBS_PLACEMENT :{LTBLUE}Permetti la disposizione automatica dei segnali pbs: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS :{LTBLUE}Posizione barra degli strumenti principale: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS_LEFT :Sinistra
STR_CONFIG_PATCHES_TOOLBAR_POS_CENTER :Centro
@@ -1439,7 +1438,6 @@ STR_RAILROAD_TRACK_WITH_NORMAL_SIGNALS :Binario ferrovi
STR_RAILROAD_TRACK_WITH_PRESIGNALS :Binario ferroviario con presegnali
STR_RAILROAD_TRACK_WITH_EXITSIGNALS :Binario ferroviario con segnali di uscita
STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :Binario ferroviario con segnali combinati
-STR_RAILROAD_TRACK_WITH_PBSSIGNALS :Binario ferroviario con segnali pbs
diff --git a/lang/norwegian.txt b/lang/norwegian.txt
index bc1d27d9b..89ee5bdc8 100644
--- a/lang/norwegian.txt
+++ b/lang/norwegian.txt
@@ -1027,7 +1027,6 @@ STR_CONFIG_PATCHES_ENDING_DATE :{LTBLUE}Spillet
STR_CONFIG_PATCHES_SMOOTH_ECONOMY :{LTBLUE}Jevn økonomi (Flere, mindre endringer)
STR_CONFIG_PATCHES_ALLOW_SHARES :{LTBLUE}Tillat kjøping av aksjer i andre selskaper
STR_CONFIG_PATCHES_DRAG_SIGNALS_DENSITY :{LTBLUE}Ved opptrekking plasser signal hver: {ORANGE}{STRING} rute(r)
-STR_CONFIG_AUTO_PBS_PLACEMENT :{LTBLUE}Tillat automatisk plassering av pbs signal: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS :{LTBLUE}Posisjon av hovedverktøylinje: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS_LEFT :Venstre
STR_CONFIG_PATCHES_TOOLBAR_POS_CENTER :Sentrert
@@ -1434,7 +1433,6 @@ STR_RAILROAD_TRACK_WITH_NORMAL_SIGNALS :Jernbanespor me
STR_RAILROAD_TRACK_WITH_PRESIGNALS :Jernbanespor med for-signaler
STR_RAILROAD_TRACK_WITH_EXITSIGNALS :Jernbanespor med forlat-signaler
STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :Jernbanespor med kombinerte signaler
-STR_RAILROAD_TRACK_WITH_PBSSIGNALS :Jernbane med PBS-signaler
diff --git a/lang/polish.txt b/lang/polish.txt
index 68fac4694..4e40e56b0 100644
--- a/lang/polish.txt
+++ b/lang/polish.txt
@@ -1030,7 +1030,6 @@ STR_CONFIG_PATCHES_ENDING_DATE :{LTBLUE}Data za
STR_CONFIG_PATCHES_SMOOTH_ECONOMY :{LTBLUE}Pozwol na lagodna ekonomie (male zmiany)
STR_CONFIG_PATCHES_ALLOW_SHARES :{LTBLUE}Pozwol kupowac udzialy w innych firmach
STR_CONFIG_PATCHES_DRAG_SIGNALS_DENSITY :{LTBLUE}W trakcie przeciagania ustaw sygnaly co: {ORANGE}{STRING} kratk{P e i ek}
-STR_CONFIG_AUTO_PBS_PLACEMENT :{LTBLUE}Zezwol na automatyczne stawianie sygnalow PBS: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS :{LTBLUE}Pozycja glownego paska narzedzi: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS_LEFT :Z lewej strony
STR_CONFIG_PATCHES_TOOLBAR_POS_CENTER :Centralnie
@@ -1438,7 +1437,6 @@ STR_RAILROAD_TRACK_WITH_NORMAL_SIGNALS :Tory kolejowe z
STR_RAILROAD_TRACK_WITH_PRESIGNALS :Tory kolejowe z pre-sygnalami
STR_RAILROAD_TRACK_WITH_EXITSIGNALS :Tory kolejowe z sygnalizacja wyjsciowa
STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :Tory kolejowe z sygnalizacja combo
-STR_RAILROAD_TRACK_WITH_PBSSIGNALS :Tory kolejowe z sygnalizacja PBS
diff --git a/lang/portuguese.txt b/lang/portuguese.txt
index 8c593cd47..b5aada3d0 100644
--- a/lang/portuguese.txt
+++ b/lang/portuguese.txt
@@ -1030,7 +1030,6 @@ STR_CONFIG_PATCHES_ENDING_DATE :{LTBLUE}Termina
STR_CONFIG_PATCHES_SMOOTH_ECONOMY :{LTBLUE}Activar economia regular (alterações menores)
STR_CONFIG_PATCHES_ALLOW_SHARES :{LTBLUE}Permite comprar acções de outras companhias
STR_CONFIG_PATCHES_DRAG_SIGNALS_DENSITY :{LTBLUE}Ao arrastar colocar sinais a cada: {ORANGE}{STRING} quadrado(s)
-STR_CONFIG_AUTO_PBS_PLACEMENT :{LTBLUE}Permitir posicionamento automático de sinais pbs: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS :{LTBLUE}Posição da barra de ferramentas principal: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS_LEFT :Esquerda
STR_CONFIG_PATCHES_TOOLBAR_POS_CENTER :Centro
@@ -1438,7 +1437,6 @@ STR_RAILROAD_TRACK_WITH_NORMAL_SIGNALS :Caminhos-de-fer
STR_RAILROAD_TRACK_WITH_PRESIGNALS :Caminhos-de-ferro com pre-sinais
STR_RAILROAD_TRACK_WITH_EXITSIGNALS :Caminhos-de-ferro com sinais de saída
STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :Caminhos-de-ferro com sinais combinados
-STR_RAILROAD_TRACK_WITH_PBSSIGNALS :Caminho de ferro com sinais pbs
diff --git a/lang/romanian.txt b/lang/romanian.txt
index 43b263147..81738694a 100644
--- a/lang/romanian.txt
+++ b/lang/romanian.txt
@@ -1029,7 +1029,6 @@ STR_CONFIG_PATCHES_ENDING_DATE :{LTBLUE}Termina
STR_CONFIG_PATCHES_SMOOTH_ECONOMY :{LTBLUE}Economie cu schimbãri de productie mai reduse, dar mai frecvente
STR_CONFIG_PATCHES_ALLOW_SHARES :{LTBLUE}Permite cumpararea de actiuni de la alte companii
STR_CONFIG_PATCHES_DRAG_SIGNALS_DENSITY :{LTBLUE}Plasare automatã a semnalelor la fiecare: {ORANGE}{STRING} pãtrãtele
-STR_CONFIG_AUTO_PBS_PLACEMENT :{LTBLUE}Permite plasarea automata a semnalelor PBS: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS :{LTBLUE}Pozitia listei cu instrumente: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS_LEFT :stânga
STR_CONFIG_PATCHES_TOOLBAR_POS_CENTER :centru
@@ -1436,7 +1435,6 @@ STR_RAILROAD_TRACK_WITH_NORMAL_SIGNALS :Cale feratã cu
STR_RAILROAD_TRACK_WITH_PRESIGNALS :Cale feratã cu pre-semnalizare
STR_RAILROAD_TRACK_WITH_EXITSIGNALS :Cale feratã cu semnale de iesire
STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :Cale feratã cu semnale combinate
-STR_RAILROAD_TRACK_WITH_PBSSIGNALS :Cai ferate cu semnalizare PBS
diff --git a/lang/slovak.txt b/lang/slovak.txt
index b231c1983..443841c23 100644
--- a/lang/slovak.txt
+++ b/lang/slovak.txt
@@ -1030,7 +1030,6 @@ STR_CONFIG_PATCHES_ENDING_DATE :{LTBLUE}Ukoncit
STR_CONFIG_PATCHES_SMOOTH_ECONOMY :{LTBLUE}Mierne zmeny ekonomiky (viac mensich zmien)
STR_CONFIG_PATCHES_ALLOW_SHARES :{LTBLUE}Povolit nakup akcii od ostatnych spolocnosti
STR_CONFIG_PATCHES_DRAG_SIGNALS_DENSITY :{LTBLUE}Pri tahani umiestnit semafory kazdych(e): {ORANGE}{STRING} dlazdic(e)
-STR_CONFIG_AUTO_PBS_PLACEMENT :{LTBLUE}Automaticke umiestnenie semaforov pbs: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS :{LTBLUE}Pozicia hlavneho menu: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS_LEFT :Na lavo
STR_CONFIG_PATCHES_TOOLBAR_POS_CENTER :V strede
@@ -1438,7 +1437,6 @@ STR_RAILROAD_TRACK_WITH_NORMAL_SIGNALS :Zeleznicne kola
STR_RAILROAD_TRACK_WITH_PRESIGNALS :Zeleznicne kolaje z pre-signami
STR_RAILROAD_TRACK_WITH_EXITSIGNALS :Zeleznicne kolaje z exit-signalmi
STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :Zeleznicne kolaje z combo-signalmi
-STR_RAILROAD_TRACK_WITH_PBSSIGNALS :Kolajnice so semaformi pbs
diff --git a/lang/spanish.txt b/lang/spanish.txt
index 8844c896a..2b8bded17 100644
--- a/lang/spanish.txt
+++ b/lang/spanish.txt
@@ -1029,7 +1029,6 @@ STR_CONFIG_PATCHES_ENDING_DATE :{LTBLUE}Fin del
STR_CONFIG_PATCHES_SMOOTH_ECONOMY :{LTBLUE}Activar economía suave (cambios más pequeños)
STR_CONFIG_PATCHES_ALLOW_SHARES :{LTBLUE}Permitir comprar acciones de otras empresas
STR_CONFIG_PATCHES_DRAG_SIGNALS_DENSITY :{LTBLUE}Cuando arrastre colocar señales cada: {ORANGE}{STRING} casilla(s)
-STR_CONFIG_AUTO_PBS_PLACEMENT :{LTBLUE}Permitir colocación automática de señales pbs: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS :{LTBLUE}Posición de la barra de herramientas principal: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS_LEFT :Izquierda
STR_CONFIG_PATCHES_TOOLBAR_POS_CENTER :Centro
@@ -1436,7 +1435,6 @@ STR_RAILROAD_TRACK_WITH_NORMAL_SIGNALS :Vía del tren co
STR_RAILROAD_TRACK_WITH_PRESIGNALS :Vía del tren con pre-señales
STR_RAILROAD_TRACK_WITH_EXITSIGNALS :Vía del tren con señales de salida
STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :Vía del tren con señales combo
-STR_RAILROAD_TRACK_WITH_PBSSIGNALS :Via del tren con señales pbs
diff --git a/lang/turkish.txt b/lang/turkish.txt
index 399b30b54..5b845c313 100644
--- a/lang/turkish.txt
+++ b/lang/turkish.txt
@@ -1030,7 +1030,6 @@ STR_CONFIG_PATCHES_ENDING_DATE :{LTBLUE}Bitis t
STR_CONFIG_PATCHES_SMOOTH_ECONOMY :{LTBLUE}Yüzeysel ekonomi (daha çok ve küçük çapta degisiklikler)
STR_CONFIG_PATCHES_ALLOW_SHARES :{LTBLUE}Diger sirketlerin hisseleri alinabilsin
STR_CONFIG_PATCHES_DRAG_SIGNALS_DENSITY :{LTBLUE}Sürüklerken her: {ORANGE}{STRING} karede bir sinyal koy
-STR_CONFIG_AUTO_PBS_PLACEMENT :{LTBLUE}pbs sinyallerini otomatik yerlestir: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS :{LTBLUE}Ana araç çubugu pozisyonu: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS_LEFT :Sol
STR_CONFIG_PATCHES_TOOLBAR_POS_CENTER :Orta
@@ -1436,7 +1435,6 @@ STR_RAILROAD_TRACK_WITH_NORMAL_SIGNALS :Normal sinyalli
STR_RAILROAD_TRACK_WITH_PRESIGNALS :Ön-sinayalli ray
STR_RAILROAD_TRACK_WITH_EXITSIGNALS :Çikis-sinyalli ray
STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :ön+çikis-sinyalli ray
-STR_RAILROAD_TRACK_WITH_PBSSIGNALS :pbs-sinyalli ray
diff --git a/lang/unfinished/latvian.txt b/lang/unfinished/latvian.txt
index e2e1d9c6d..e7ee0db33 100644
--- a/lang/unfinished/latvian.txt
+++ b/lang/unfinished/latvian.txt
@@ -1004,7 +1004,6 @@ STR_CONFIG_PATCHES_NOSERVICE :{LTBLUE}Aizlied
STR_CONFIG_PATCHES_ENDING_DATE :{LTBLUE}Nobeidz spe'li: {ORANGE}{STRING}
STR_CONFIG_PATCHES_ALLOW_SHARES :{LTBLUE}Atïauj akciju pirkðanu no citâm kompânijâm
-STR_CONFIG_AUTO_PBS_PLACEMENT :{LTBLUE}Atl'aut automatisko novietojumu PBS signa'lus: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TOOLBAR_POS_LEFT :Pa kreisi
STR_CONFIG_PATCHES_TOOLBAR_POS_CENTER :Centrâ
STR_CONFIG_PATCHES_TOOLBAR_POS_RIGHT :Pa labi
@@ -1121,7 +1120,6 @@ STR_080A_ROCKS :Akmeòi
##id 0x1000
STR_1021_RAILROAD_TRACK :Dzelzceïa ceïs
-STR_RAILROAD_TRACK_WITH_PBSSIGNALS :Dzelzcel's' ar pbs signa'liem
diff --git a/npf.c b/npf.c
index d2472346a..a2bb43476 100644
--- a/npf.c
+++ b/npf.c
@@ -47,66 +47,6 @@ static uint NPFDistanceTrack(TileIndex t0, TileIndex t1)
return diagTracks * NPF_TILE_LENGTH + straightTracks * NPF_TILE_LENGTH * STRAIGHT_TRACK_LENGTH;
}
-/**
- * Check if a rail track is the end of the line. Will also consider 1-way signals to be the end of a line.
- * @param tile The tile on which the current track is.
- * @param trackdir The (track)direction in which you want to look.
- * @param enginetype The type of the engine for which we are checking this.
- */
-static bool IsEndOfLine(TileIndex tile, Trackdir trackdir, RailType enginetype)
-{
- byte exitdir = TrackdirToExitdir(trackdir);
- TileIndex dst_tile;
- uint32 ts;
-
- /* Can always go into a tunnel */
- if (IsTileType(tile, MP_TUNNELBRIDGE) && GB(_m[tile].m5, 4, 4) == 0 &&
- GB(_m[tile].m5, 0, 2) == exitdir) {
- return false;
- }
-
- /* Cannot go through the back of a depot */
- if (IsTileDepotType(tile, TRANSPORT_RAIL) && (exitdir != GetDepotDirection(tile, TRANSPORT_RAIL)))
- return true;
-
- /* Calculate next tile */
- dst_tile = tile + TileOffsByDir(exitdir);
- // determine the track status on the next tile.
- ts = GetTileTrackStatus(dst_tile, TRANSPORT_RAIL) & TrackdirReachesTrackdirs(trackdir);
-
- // when none of the trackdir bits are set, we cant enter the new tile
- if ( (ts & TRACKDIR_BIT_MASK) == 0)
- return true;
-
- {
- byte dst_type = GetTileRailType(dst_tile, exitdir);
- if (!IsCompatibleRail(enginetype, dst_type))
- return true;
- if (GetTileOwner(tile) != GetTileOwner(dst_tile))
- return true;
-
- /* Prevent us from entering a depot from behind */
- if (IsTileDepotType(dst_tile, TRANSPORT_RAIL) && (exitdir != ReverseDiagdir(GetDepotDirection(dst_tile, TRANSPORT_RAIL))))
- return true;
-
- /* Prevent us from falling off a slope into a tunnel exit */
- if (IsTileType(dst_tile, MP_TUNNELBRIDGE) &&
- GB(_m[dst_tile].m5, 4, 4) == 0 &&
- (DiagDirection)GB(_m[dst_tile].m5, 0, 2) == ReverseDiagdir(exitdir)) {
- return true;
- }
-
- /* Check for oneway signal against us */
- if (IsTileType(dst_tile, MP_RAILWAY) && GetRailTileType(dst_tile) == RAIL_TYPE_SIGNALS) {
- if (HasSignalOnTrackdir(dst_tile, ReverseTrackdir(FindFirstBit2x64(ts))) && !HasSignalOnTrackdir(dst_tile, FindFirstBit2x64(ts)))
- // if one way signal not pointing towards us, stop going in this direction.
- return true;
- }
-
- return false;
- }
-}
-
#if 0
static uint NTPHash(uint key1, uint key2)
{
@@ -164,90 +104,6 @@ static TileIndex CalcClosestStationTile(StationID station, TileIndex tile)
return TileXY(x, y);
}
-/* On PBS pathfinding runs, this is called before pathfinding ends (BeforeExit aystar callback), and will
- * reserve the appropriate tracks, if needed. */
-static void NPFReservePBSPath(AyStar *as)
-{
- NPFFoundTargetData* ftd = (NPFFoundTargetData*)as->user_path;
- bool eol_end = false;
-
- if (ftd->best_trackdir == 0xFF)
- return;
-
- if (!NPFGetFlag(&ftd->node, NPF_FLAG_PBS_EXIT) && IsEndOfLine(ftd->node.tile, ftd->node.direction, as->user_data[NPF_RAILTYPE]) && !NPFGetFlag(&ftd->node, NPF_FLAG_SEEN_SIGNAL)) {
- /* The path ends in an end of line, we'll need to reserve a path.
- * We treat and end of line as a red exit signal */
- eol_end = true;
- NPFSetFlag(&ftd->node, NPF_FLAG_PBS_EXIT, true);
- if (!NPFGetFlag(&ftd->node, NPF_FLAG_PBS_TARGET_SEEN))
- NPFSetFlag(&ftd->node, NPF_FLAG_PBS_RED, true);
- }
-
- if (!NPFGetFlag(&ftd->node, NPF_FLAG_PBS_CHOICE)) {
- /* there have been no choices to make on our path, we dont care if our end signal is red */
- NPFSetFlag(&ftd->node, NPF_FLAG_PBS_RED, false);
- }
-
- if (NPFGetFlag(&ftd->node, NPF_FLAG_PBS_EXIT) && // we passed an exit signal
- !NPFGetFlag(&ftd->node, NPF_FLAG_PBS_BLOCKED) && // we didnt encounter reserver tracks
- ((as->user_data[NPF_PBS_MODE] != PBS_MODE_GREEN) || (!NPFGetFlag(&ftd->node, NPF_FLAG_PBS_RED))) ) { // our mode permits having a red exit signal, or the signal is green
- PathNode parent;
- PathNode *curr;
- PathNode *prev;
- TileIndex start = INVALID_TILE;
- byte trackdir = 0;
-
- parent.node = ftd->node;
- parent.parent = &ftd->path;
- curr = &parent;
- prev = NULL;
-
- do {
- if (!NPFGetFlag(&curr->node, NPF_FLAG_PBS_EXIT) || eol_end) {
- /* check for already reserved track on this path, if they clash with what we
- currently trying to reserve, we have a self-crossing path :-( */
- if ((PBSTileUnavail(curr->node.tile) & (1 << curr->node.direction))
- && !(PBSTileReserved(curr->node.tile) & (1 << (curr->node.direction & 7)))
- && (start != INVALID_TILE)) {
- /* It's actually quite bad if this happens, it means the pathfinder
- * found a path that is intersecting with itself, which is a very bad
- * thing in a pbs block. Also there is not much we can do about it at
- * this point....
- * BUT, you have to have a pretty fucked up junction layout for this to happen,
- * so we'll just stop this train, the user will eventually notice, so he can fix it.
- */
- PBSClearPath(start, trackdir, curr->node.tile, curr->node.direction);
- NPFSetFlag(&ftd->node, NPF_FLAG_PBS_BLOCKED, true);
- DEBUG(pbs, 1) ("PBS: Self-crossing path!!!");
- return;
- };
-
- PBSReserveTrack(curr->node.tile, TrackdirToTrack(curr->node.direction) );
-
- /* we want to reserve the last tile (with the signal) on the path too
- also remember this tile, cause its the end of the path (where we exit the block) */
- if (start == INVALID_TILE) {
- if (prev != NULL) {
- PBSReserveTrack(prev->node.tile, TrackdirToTrack(prev->node.direction) );
- start = prev->node.tile;
- trackdir = ReverseTrackdir(prev->node.direction);
- } else {
- start = curr->node.tile;
- trackdir = curr->node.direction;
- }
- }
- }
-
- prev = curr;
- curr = curr->parent;
- } while (curr != NULL);
- // we remember the tile/track where this path leaves the pbs junction
- ftd->node.tile = start;
- ftd->node.direction = trackdir;
- }
-}
-
-
/* Calcs the heuristic to the target station or tile. For train stations, it
* takes into account the direction of approach.
*/
@@ -272,21 +128,9 @@ static int32 NPFCalcStationOrTileHeuristic(AyStar* as, AyStarNode* current, Open
DEBUG(npf, 4)("Calculating H for: (%d, %d). Result: %d", TileX(current->tile), TileY(current->tile), dist);
- /* for pbs runs, we ignore tiles inside the pbs block for the tracking
- of the 'closest' tile */
- if ((as->user_data[NPF_PBS_MODE] != PBS_MODE_NONE)
- && (!NPFGetFlag(current , NPF_FLAG_SEEN_SIGNAL))
- && (!IsEndOfLine(current->tile, current->direction, as->user_data[NPF_RAILTYPE])))
- return dist;
-
- if ((dist < ftd->best_bird_dist) ||
- /* for pbs runs, prefer tiles that pass a green exit signal to the pbs blocks */
- ((as->user_data[NPF_PBS_MODE] != PBS_MODE_NONE) && !NPFGetFlag(current, NPF_FLAG_PBS_RED) && NPFGetFlag(&ftd->node, NPF_FLAG_PBS_RED))
-) {
+ if (dist < ftd->best_bird_dist) {
ftd->best_bird_dist = dist;
ftd->best_trackdir = current->user_data[NPF_TRACKDIR_CHOICE];
- ftd->path = parent->path;
- ftd->node = *current;
}
return dist;
}
@@ -485,11 +329,6 @@ static int32 NPFRailPathCost(AyStar* as, AyStarNode* current, OpenListNode* pare
/* Determine extra costs */
- /* Check for reserved tracks (PBS) */
- if ((as->user_data[NPF_PBS_MODE] != PBS_MODE_NONE) && !(NPFGetFlag(current, NPF_FLAG_PBS_EXIT)) && !(NPFGetFlag(current, NPF_FLAG_PBS_BLOCKED)) && (PBSTileUnavail(tile) & (1<<trackdir))) {
- NPFSetFlag(current, NPF_FLAG_PBS_BLOCKED, true);
- };
-
/* Check for signals */
if (IsTileType(tile, MP_RAILWAY) && HasSignalOnTrackdir(tile, trackdir)) {
/* Ordinary track with signals */
@@ -506,10 +345,6 @@ static int32 NPFRailPathCost(AyStar* as, AyStarNode* current, OpenListNode* pare
cost += _patches.npf_rail_firstred_exit_penalty;
else
cost += _patches.npf_rail_firstred_penalty;
-
- /* for pbs runs, store the fact that the exit signal to the pbs block was red */
- if (!(NPFGetFlag(current, NPF_FLAG_PBS_EXIT)) && !(NPFGetFlag(current, NPF_FLAG_PBS_RED)) && NPFGetFlag(current, NPF_FLAG_PBS_CHOICE))
- NPFSetFlag(current, NPF_FLAG_PBS_RED, true);
}
/* Record the state of this signal */
NPFSetFlag(current, NPF_FLAG_LAST_SIGNAL_RED, true);
@@ -517,15 +352,6 @@ static int32 NPFRailPathCost(AyStar* as, AyStarNode* current, OpenListNode* pare
/* Record the state of this signal */
NPFSetFlag(current, NPF_FLAG_LAST_SIGNAL_RED, false);
}
-
- if (!NPFGetFlag(current, NPF_FLAG_SEEN_SIGNAL) && NPFGetFlag(current, NPF_FLAG_PBS_BLOCKED)) {
- /* penalise a path through the pbs block if it crosses reserved tracks */
- cost += 1000;
- }
- if ((PBSIsPbsSignal(tile, trackdir)) && !NPFGetFlag(current, NPF_FLAG_SEEN_SIGNAL)) {
- /* we've encountered an exit signal to the pbs block */
- NPFSetFlag(current, NPF_FLAG_PBS_EXIT, true);
- }
NPFSetFlag(current, NPF_FLAG_SEEN_SIGNAL, true);
}
@@ -547,25 +373,13 @@ static int32 NPFRailPathCost(AyStar* as, AyStarNode* current, OpenListNode* pare
// curves should be taken into account, as this affects the speed limit.
- /* Check for depots */
- if (IsTileDepotType(tile, TRANSPORT_RAIL)) {
+ /* Check for reverse in depot */
+ if (IsTileDepotType(tile, TRANSPORT_RAIL) && as->EndNodeCheck(as, &new_node) != AYSTAR_FOUND_END_NODE) {
/* Penalise any depot tile that is not the last tile in the path. This
* _should_ penalise every occurence of reversing in a depot (and only
* that) */
- if (as->EndNodeCheck(as, &new_node) != AYSTAR_FOUND_END_NODE)
- cost += _patches.npf_rail_depot_reverse_penalty;
+ cost += _patches.npf_rail_depot_reverse_penalty;
- /* Do we treat this depot as a pbs signal? */
- if (!NPFGetFlag(current, NPF_FLAG_SEEN_SIGNAL)) {
- if (NPFGetFlag(current, NPF_FLAG_PBS_BLOCKED)) {
- cost += 1000;
- }
- if (PBSIsPbsSegment(tile, ReverseTrackdir(trackdir))) {
- NPFSetFlag(current, NPF_FLAG_PBS_EXIT, true);
- NPFSetFlag(current, NPF_FLAG_SEEN_SIGNAL, true);
- }
- }
- NPFSetFlag(current, NPF_FLAG_LAST_SIGNAL_RED, false);
}
/* Check for occupied track */
@@ -600,13 +414,8 @@ static int32 NPFFindStationOrTile(AyStar* as, OpenListNode *current)
* is correct */
if (
(fstd->station_index == -1 && tile == fstd->dest_coords) || /* We've found the tile, or */
- (IsTileType(tile, MP_STATION) && _m[tile].m2 == fstd->station_index) || /* the station */
- (NPFGetFlag(node, NPF_FLAG_PBS_TARGET_SEEN)) /* or, we've passed it already (for pbs) */
+ (IsTileType(tile, MP_STATION) && _m[tile].m2 == fstd->station_index) /* the station */
) {
- NPFSetFlag(&current->path.node, NPF_FLAG_PBS_TARGET_SEEN, true);
- /* for pbs runs, only accept we've found the target if we've also found a way out of the block */
- if ((as->user_data[NPF_PBS_MODE] != PBS_MODE_NONE) && !NPFGetFlag(node, NPF_FLAG_SEEN_SIGNAL) && !IsEndOfLine(node->tile, node->direction, as->user_data[NPF_RAILTYPE]))
- return AYSTAR_DONE;
return AYSTAR_FOUND_END_NODE;
} else {
return AYSTAR_DONE;
@@ -624,7 +433,6 @@ static void NPFSaveTargetData(AyStar* as, OpenListNode* current)
ftd->best_path_dist = current->g;
ftd->best_bird_dist = 0;
ftd->node = current->path.node;
- ftd->path = current->path;
}
/**
@@ -701,8 +509,6 @@ static void NPFFollowTrack(AyStar* aystar, OpenListNode* current)
aystar->num_neighbours = 0;
DEBUG(npf, 4)("Expanding: (%d, %d, %d) [%d]", TileX(src_tile), TileY(src_tile), src_trackdir, src_tile);
- aystar->EndNodeCheck(aystar, current);
-
/* Find dest tile */
if (IsTileType(src_tile, MP_TUNNELBRIDGE) && GB(_m[src_tile].m5, 4, 4) == 0 &&
(DiagDirection)GB(_m[src_tile].m5, 0, 2) == src_exitdir) {
@@ -789,16 +595,7 @@ static void NPFFollowTrack(AyStar* aystar, OpenListNode* current)
/* Select only trackdirs we can reach from our current trackdir */
trackdirbits &= TrackdirReachesTrackdirs(src_trackdir);
if (_patches.forbid_90_deg && (type == TRANSPORT_RAIL || type == TRANSPORT_WATER)) /* Filter out trackdirs that would make 90 deg turns for trains */
-
- trackdirbits &= ~TrackdirCrossesTrackdirs(src_trackdir);
-
- if (KillFirstBit2x64(trackdirbits) != 0)
- NPFSetFlag(&current->path.node, NPF_FLAG_PBS_CHOICE, true);
-
- /* When looking for 'any' route, ie when already inside a pbs block, discard all tracks that would cross
- other reserved tracks, so we *always* will find a valid route if there is one */
- if (!(NPFGetFlag(&current->path.node, NPF_FLAG_PBS_EXIT)) && (aystar->user_data[NPF_PBS_MODE] == PBS_MODE_ANY))
- trackdirbits &= ~PBSTileUnavail(dst_tile);
+ trackdirbits &= ~TrackdirCrossesTrackdirs(src_trackdir);
DEBUG(npf,6)("After filtering: (%d, %d), possible trackdirs: %#x", TileX(dst_tile), TileY(dst_tile), trackdirbits);
@@ -840,7 +637,7 @@ static void NPFFollowTrack(AyStar* aystar, OpenListNode* current)
* multiple targets that are spread around, we should perform a breadth first
* search by specifiying CalcZero as our heuristic.
*/
-static NPFFoundTargetData NPFRouteInternal(AyStarNode* start1, AyStarNode* start2, NPFFindStationOrTileData* target, AyStar_EndNodeCheck target_proc, AyStar_CalculateH heuristic_proc, TransportType type, Owner owner, RailType railtype, uint reverse_penalty, byte pbs_mode)
+static NPFFoundTargetData NPFRouteInternal(AyStarNode* start1, AyStarNode* start2, NPFFindStationOrTileData* target, AyStar_EndNodeCheck target_proc, AyStar_CalculateH heuristic_proc, TransportType type, Owner owner, RailType railtype, uint reverse_penalty)
{
int r;
NPFFoundTargetData result;
@@ -859,11 +656,6 @@ static NPFFoundTargetData NPFRouteInternal(AyStarNode* start1, AyStarNode* start
else
assert(0);
- if (pbs_mode != PBS_MODE_NONE)
- _npf_aystar.BeforeExit = NPFReservePBSPath;
- else
- _npf_aystar.BeforeExit = NULL;
-
/* Initialize Start Node(s) */
start1->user_data[NPF_TRACKDIR_CHOICE] = INVALID_TRACKDIR;
start1->user_data[NPF_NODE_FLAGS] = 0;
@@ -888,7 +680,6 @@ static NPFFoundTargetData NPFRouteInternal(AyStarNode* start1, AyStarNode* start
_npf_aystar.user_data[NPF_TYPE] = type;
_npf_aystar.user_data[NPF_OWNER] = owner;
_npf_aystar.user_data[NPF_RAILTYPE] = railtype;
- _npf_aystar.user_data[NPF_PBS_MODE] = pbs_mode;
/* GO! */
r = AyStarMain_Main(&_npf_aystar);
@@ -906,7 +697,7 @@ static NPFFoundTargetData NPFRouteInternal(AyStarNode* start1, AyStarNode* start
return result;
}
-NPFFoundTargetData NPFRouteToStationOrTileTwoWay(TileIndex tile1, Trackdir trackdir1, TileIndex tile2, Trackdir trackdir2, NPFFindStationOrTileData* target, TransportType type, Owner owner, RailType railtype, byte pbs_mode)
+NPFFoundTargetData NPFRouteToStationOrTileTwoWay(TileIndex tile1, Trackdir trackdir1, TileIndex tile2, Trackdir trackdir2, NPFFindStationOrTileData* target, TransportType type, Owner owner, RailType railtype)
{
AyStarNode start1;
AyStarNode start2;
@@ -920,12 +711,12 @@ NPFFoundTargetData NPFRouteToStationOrTileTwoWay(TileIndex tile1, Trackdir track
start2.direction = trackdir2;
start2.user_data[NPF_TRACKDIR_CHOICE] = INVALID_TRACKDIR;
- return NPFRouteInternal(&start1, (IsValidTile(tile2) ? &start2 : NULL), target, NPFFindStationOrTile, NPFCalcStationOrTileHeuristic, type, owner, railtype, 0, pbs_mode);
+ return NPFRouteInternal(&start1, (IsValidTile(tile2) ? &start2 : NULL), target, NPFFindStationOrTile, NPFCalcStationOrTileHeuristic, type, owner, railtype, 0);
}
-NPFFoundTargetData NPFRouteToStationOrTile(TileIndex tile, Trackdir trackdir, NPFFindStationOrTileData* target, TransportType type, Owner owner, RailType railtype, byte pbs_mode)
+NPFFoundTargetData NPFRouteToStationOrTile(TileIndex tile, Trackdir trackdir, NPFFindStationOrTileData* target, TransportType type, Owner owner, RailType railtype)
{
- return NPFRouteToStationOrTileTwoWay(tile, trackdir, INVALID_TILE, 0, target, type, owner, railtype, pbs_mode);
+ return NPFRouteToStationOrTileTwoWay(tile, trackdir, INVALID_TILE, 0, target, type, owner, railtype);
}
NPFFoundTargetData NPFRouteToDepotBreadthFirstTwoWay(TileIndex tile1, Trackdir trackdir1, TileIndex tile2, Trackdir trackdir2, TransportType type, Owner owner, RailType railtype, uint reverse_penalty)
@@ -944,7 +735,7 @@ NPFFoundTargetData NPFRouteToDepotBreadthFirstTwoWay(TileIndex tile1, Trackdir t
/* perform a breadth first search. Target is NULL,
* since we are just looking for any depot...*/
- return NPFRouteInternal(&start1, (IsValidTile(tile2) ? &start2 : NULL), NULL, NPFFindDepot, NPFCalcZero, type, owner, railtype, reverse_penalty, PBS_MODE_NONE);
+ return NPFRouteInternal(&start1, (IsValidTile(tile2) ? &start2 : NULL), NULL, NPFFindDepot, NPFCalcZero, type, owner, railtype, reverse_penalty);
}
NPFFoundTargetData NPFRouteToDepotBreadthFirst(TileIndex tile, Trackdir trackdir, TransportType type, Owner owner, RailType railtype)
@@ -997,8 +788,6 @@ NPFFoundTargetData NPFRouteToDepotTrialError(TileIndex tile, Trackdir trackdir,
else
assert(0);
- _npf_aystar.BeforeExit = NULL;
-
/* Initialize target */
target.station_index = -1; /* We will initialize dest_coords inside the loop below */
_npf_aystar.user_target = &target;
@@ -1006,7 +795,6 @@ NPFFoundTargetData NPFRouteToDepotTrialError(TileIndex tile, Trackdir trackdir,
/* Initialize user_data */
_npf_aystar.user_data[NPF_TYPE] = type;
_npf_aystar.user_data[NPF_OWNER] = owner;
- _npf_aystar.user_data[NPF_PBS_MODE] = PBS_MODE_NONE;
/* Initialize Start Node */
start.tile = tile;
diff --git a/npf.h b/npf.h
index 17fd11e03..743a439e9 100644
--- a/npf.h
+++ b/npf.h
@@ -6,7 +6,6 @@
#include "openttd.h"
#include "aystar.h"
#include "vehicle.h"
-#include "pbs.h"
#include "tile.h"
#include "variables.h"
@@ -39,7 +38,6 @@ enum { /* Indices into AyStar.userdata[] */
NPF_TYPE = 0, /* Contains a TransportTypes value */
NPF_OWNER, /* Contains an Owner value */
NPF_RAILTYPE, /* Contains the RailType value of the engine when NPF_TYPE == TRANSPORT_RAIL. Unused otherwise. */
- NPF_PBS_MODE, /* Contains the pbs mode, see pbs.h */
};
enum { /* Indices into AyStarNode.userdata[] */
@@ -51,11 +49,6 @@ typedef enum { /* Flags for AyStarNode.userdata[NPF_NODE_FLAGS]. Use NPFGetBit()
NPF_FLAG_SEEN_SIGNAL, /* Used to mark that a signal was seen on the way, for rail only */
NPF_FLAG_REVERSE, /* Used to mark that this node was reached from the second start node, if applicable */
NPF_FLAG_LAST_SIGNAL_RED, /* Used to mark that the last signal on this path was red */
- NPF_FLAG_PBS_EXIT, /* Used to mark tracks inside a pbs block, for rail only, for the end node, this is set when the path found goes through a pbs block */
- NPF_FLAG_PBS_BLOCKED, /* Used to mark that this path crosses another pbs path */
- NPF_FLAG_PBS_RED, /* Used to mark that this path goes through a red exit-pbs signal */
- NPF_FLAG_PBS_CHOICE, /* Used to mark that the train has had a choice on this path */
- NPF_FLAG_PBS_TARGET_SEEN, /* Used to mark that a target tile has been passed on this path */
} NPFNodeFlag;
typedef struct NPFFoundTargetData { /* Meant to be stored in AyStar.userpath */
@@ -63,7 +56,6 @@ typedef struct NPFFoundTargetData { /* Meant to be stored in AyStar.userpath */
uint best_path_dist; /* The shortest path. Is (uint)-1 if no path is found */
Trackdir best_trackdir; /* The trackdir that leads to the shortest path/closest birds dist */
AyStarNode node; /* The node within the target the search led us to */
- PathNode path;
} NPFFoundTargetData;
/* These functions below are _not_ re-entrant, in favor of speed! */
@@ -71,12 +63,11 @@ typedef struct NPFFoundTargetData { /* Meant to be stored in AyStar.userpath */
/* Will search from the given tile and direction, for a route to the given
* station for the given transport type. See the declaration of
* NPFFoundTargetData above for the meaning of the result. */
-NPFFoundTargetData NPFRouteToStationOrTile(TileIndex tile, Trackdir trackdir, NPFFindStationOrTileData* target, TransportType type, Owner owner, RailType railtype, byte pbs_mode);
-
+NPFFoundTargetData NPFRouteToStationOrTile(TileIndex tile, Trackdir trackdir, NPFFindStationOrTileData* target, TransportType type, Owner owner, RailType railtype);
/* Will search as above, but with two start nodes, the second being the
* reverse. Look at the NPF_FLAG_REVERSE flag in the result node to see which
* direction was taken (NPFGetBit(result.node, NPF_FLAG_REVERSE)) */
-NPFFoundTargetData NPFRouteToStationOrTileTwoWay(TileIndex tile1, Trackdir trackdir1, TileIndex tile2, Trackdir trackdir2, NPFFindStationOrTileData* target, TransportType type, Owner owner, RailType railtype, byte pbs_mode);
+NPFFoundTargetData NPFRouteToStationOrTileTwoWay(TileIndex tile1, Trackdir trackdir1, TileIndex tile2, Trackdir trackdir2, NPFFindStationOrTileData* target, TransportType type, Owner owner, RailType railtype);
/* Will search a route to the closest depot. */
diff --git a/oldloader.c b/oldloader.c
index 95573c307..81a7fc4e8 100644
--- a/oldloader.c
+++ b/oldloader.c
@@ -1574,7 +1574,7 @@ static bool LoadOldMain(LoadgameState *ls)
for (i = 0; i < OLD_MAP_SIZE; i ++) {
if (IsTileType(i, MP_RAILWAY)) {
/* We save presignals different from TTDPatch, convert them */
- if ((_m[i].m5 & 0xC0) == 0x40) {
+ if (GB(_m[i].m5, 6, 2) == 1) {
/* This byte is always zero in TTD for this type of tile */
if (_m[i].m4) /* Convert the presignals to our own format */
_m[i].m4 = (_m[i].m4 >> 1) & 7;
diff --git a/openttd.c b/openttd.c
index 5e8731f08..181304ff6 100644
--- a/openttd.c
+++ b/openttd.c
@@ -1249,20 +1249,6 @@ bool AfterLoadGame(void)
FOR_ALL_TOWNS(t) UpdateTownMaxPass(t);
}
- /* From version 15.0, we moved a semaphore bit from bit 2 to bit 3 in m4, making
- * room for PBS. While doing that, clean some blocks that should be empty, for PBS. */
- if (CheckSavegameVersion(15)) {
- BEGIN_TILE_LOOP(tile, MapSizeX(), MapSizeY(), 0) {
- if (IsTileType(tile, MP_RAILWAY) && HasSignals(tile) && HASBIT(_m[tile].m4, 2)) {
- CLRBIT(_m[tile].m4, 2);
- SETBIT(_m[tile].m4, 3);
- }
- // Clear possible junk data in PBS bits.
- if (IsTileType(tile, MP_RAILWAY) && !HASBIT(_m[tile].m5, 7))
- SB(_m[tile].m4, 4, 4, 0);
- } END_TILE_LOOP(tile, MapSizeX(), MapSizeY(), 0);
- }
-
/* From version 16.0, we included autorenew on engines, which are now saved, but
* of course, we do need to initialize them for older savegames. */
if (CheckSavegameVersion(16)) {
@@ -1328,6 +1314,37 @@ bool AfterLoadGame(void)
UpdateAllWaypointCustomGraphics();
}
+ /* From version 15, we moved a semaphore bit from bit 2 to bit 3 in m4, making
+ * room for PBS. Now in version 21 move it back :P. */
+ if (CheckSavegameVersion(21) && !CheckSavegameVersion(15)) {
+ BEGIN_TILE_LOOP(tile, MapSizeX(), MapSizeY(), 0) {
+ if (IsTileType(tile, MP_RAILWAY)) {
+ // Clear PBS signals, move back sempahore bit to 2
+ if (HasSignals(tile)) {
+ // convert PBS signals to combo-signals
+ if (HASBIT(_m[tile].m4, 2)) SB(_m[tile].m4, 0, 2, 3);
+
+ SB(_m[tile].m4, 2, 2, HASBIT(_m[tile].m4, 3));
+ CLRBIT(_m[tile].m4, 3);
+ }
+
+ // Clear PBS reservation on track
+ if (!IsTileDepotType(tile, TRANSPORT_RAIL))
+ SB(_m[tile].m4, 4, 4, 0);
+ else
+ CLRBIT(_m[tile].m3, 6);
+ }
+
+ // Clear PBS reservation on crossing
+ if (IsTileType(tile, MP_STREET) && IsLevelCrossing(tile))
+ CLRBIT(_m[tile].m5, 0);
+
+ // Clear PBS reservation on station
+ if (IsTileType(tile, MP_STATION) && IsLevelCrossing(tile))
+ CLRBIT(_m[tile].m3, 6);
+ } END_TILE_LOOP(tile, MapSizeX(), MapSizeY(), 0);
+ }
+
FOR_ALL_PLAYERS(p) p->avail_railtypes = GetPlayerRailtypes(p->index);
return true;
diff --git a/openttd.dsp b/openttd.dsp
index 1323ed45a..898bbd6f4 100644
--- a/openttd.dsp
+++ b/openttd.dsp
@@ -335,10 +335,6 @@ SOURCE=.\pathfind.c
# End Source File
# Begin Source File
-SOURCE=.\pbs.c
-# End Source File
-# Begin Source File
-
SOURCE=.\players.c
# End Source File
# Begin Source File
@@ -650,10 +646,6 @@ SOURCE=.\pathfind.h
# End Source File
# Begin Source File
-SOURCE=.\pbs.h
-# End Source File
-# Begin Source File
-
SOURCE=.\player.h
# End Source File
# Begin Source File
diff --git a/openttd.vcproj b/openttd.vcproj
index a6afa2ffa..1ffebc8cb 100644
--- a/openttd.vcproj
+++ b/openttd.vcproj
@@ -297,9 +297,6 @@
RelativePath=".\pathfind.c">
</File>
<File
- RelativePath=".\pbs.c">
- </File>
- <File
RelativePath="players.c">
</File>
<File
@@ -511,9 +508,6 @@
RelativePath=".\pathfind.h">
</File>
<File
- RelativePath=".\pbs.h">
- </File>
- <File
RelativePath=".\player.h">
</File>
<File
diff --git a/rail.h b/rail.h
index f5c109994..c2dfbf207 100644
--- a/rail.h
+++ b/rail.h
@@ -42,14 +42,13 @@ typedef enum RailTileSubtypes {
} RailTileSubtype;
typedef enum SignalTypes {
- /* Stored in m4[0..2] for MP_RAILWAY */
+ /* Stored in m4[0..1] for MP_RAILWAY */
SIGTYPE_NORMAL = 0, // normal signal
SIGTYPE_ENTRY = 1, // presignal block entry
SIGTYPE_EXIT = 2, // presignal block exit
SIGTYPE_COMBO = 3, // presignal inter-block
- SIGTYPE_PBS = 4, // pbs signal
SIGTYPE_END,
- SIGTYPE_MASK = 7,
+ SIGTYPE_MASK = 3,
} SignalType;
typedef enum RailTypes {
@@ -62,7 +61,7 @@ typedef enum RailTypes {
} RailType;
enum {
- SIG_SEMAPHORE_MASK = 1 << 3,
+ SIG_SEMAPHORE_MASK = 1 << 2,
};
/** These are used to specify a single track. Can be translated to a trackbit
diff --git a/rail_cmd.c b/rail_cmd.c
index ddea310b6..bc2ee557e 100644
--- a/rail_cmd.c
+++ b/rail_cmd.c
@@ -18,9 +18,7 @@
#include "station.h"
#include "sprite.h"
#include "depot.h"
-#include "pbs.h"
#include "waypoint.h"
-#include "npf.h"
#include "rail.h"
#include "railtypes.h" // include table for railtypes
@@ -474,10 +472,6 @@ int32 CmdRemoveSingleRail(int x, int y, uint32 flags, uint32 p1, uint32 p2)
/* We remove the trackbit here. */
_m[tile].m5 &= ~trackbit;
- /* Unreserve track for PBS */
- if (PBSTileReserved(tile) & trackbit)
- PBSClearTrack(tile, track);
-
if (GetTrackBits(tile) == 0) {
/* The tile has no tracks left, it is no longer a rail tile */
DoClearSquare(tile);
@@ -766,9 +760,9 @@ int32 CmdBuildSingleSignal(int x, int y, uint32 flags, uint32 p1, uint32 p2)
_m[tile].m3 |= SignalOnTrack(track);
} else {
if (pre_signal) {
- // cycle between normal -> pre -> exit -> combo -> pbs ->...
+ // cycle between normal -> pre -> exit -> combo -> ...
byte type = (GetSignalType(tile, track) + 1) % SIGTYPE_END;
- SB(_m[tile].m4, 0, 3, type);
+ SB(_m[tile].m4, 0, 2, type);
} else {
// cycle between two-way -> one-way -> one-way -> ...
/* TODO: Rewrite switch into something more general */
@@ -799,9 +793,9 @@ int32 CmdBuildSingleSignal(int x, int y, uint32 flags, uint32 p1, uint32 p2)
_m[tile].m3 |= p2 & SignalOnTrack(track);
// convert between signal<->semaphores when dragging
if (semaphore) {
- SETBIT(_m[tile].m4, 3);
+ SETBIT(_m[tile].m4, 2);
} else {
- CLRBIT(_m[tile].m4, 3);
+ CLRBIT(_m[tile].m4, 2);
}
}
@@ -938,7 +932,7 @@ int32 CmdRemoveSingleSignal(int x, int y, uint32 flags, uint32 p1, uint32 p2)
if (GB(_m[tile].m3, 4, 4) == 0) {
SB(_m[tile].m2, 4, 4, 0);
SB(_m[tile].m5, 6, 2, RAIL_TYPE_NORMAL >> 6); // XXX >> because the constant is meant for direct application, not use with SB
- CLRBIT(_m[tile].m4, 3); // remove any possible semaphores
+ CLRBIT(_m[tile].m4, 2); // remove any possible semaphores
}
SetSignalsOnBothDir(tile, track);
@@ -1130,54 +1124,29 @@ static int32 ClearTile_Track(TileIndex tile, byte flags)
#include "table/track_land.h"
// used for presignals
-static const SpriteID _signal_base_sprites[32] = {
+static const SpriteID _signal_base_sprites[16] = {
0x4FB,
0x1323,
0x1333,
0x1343,
- // pbs signals
- 0x1393,
- 0x13A3, // not used (yet?)
- 0x13B3, // not used (yet?)
- 0x13C3, // not used (yet?)
-
// semaphores
0x1353,
0x1363,
0x1373,
0x1383,
- // pbs semaphores
- 0x13D3,
- 0x13E3, // not used (yet?)
- 0x13F3, // not used (yet?)
- 0x1403, // not used (yet?)
-
-
// mirrored versions
0x4FB,
0x1323,
0x1333,
0x1343,
- // pbs signals
- 0x1393,
- 0x13A3, // not used (yet?)
- 0x13B3, // not used (yet?)
- 0x13C3, // not used (yet?)
-
// semaphores
0x1446,
0x1456,
0x1466,
0x1476,
-
- // pbs semaphores
- 0x14C6,
- 0x14D6, // not used (yet?)
- 0x14E6, // not used (yet?)
- 0x14F6, // not used (yet?)
};
// used to determine the side of the road for the signal
@@ -1195,7 +1164,7 @@ static void DrawSignalHelper(const TileInfo *ti, byte condition, uint32 image_an
uint v = _signal_position[(image_and_pos & 0xF) + (otherside ? 12 : 0)];
uint x = ti->x | (v&0xF);
uint y = ti->y | (v>>4);
- uint sprite = _signal_base_sprites[(_m[ti->tile].m4 & 0xF) + (otherside ? 0x10 : 0)] + (image_and_pos>>4) + ((condition != 0) ? 1 : 0);
+ uint sprite = _signal_base_sprites[(_m[ti->tile].m4 & 0x7) + (otherside ? 8 : 0)] + (image_and_pos>>4) + ((condition != 0) ? 1 : 0);
AddSortableSpriteToDraw(sprite, x, y, 1, 1, 10, GetSlopeZ(x,y));
}
@@ -1387,16 +1356,6 @@ static void DrawTrackBits(TileInfo* ti, TrackBits track, bool earth, bool snow,
if (track & TRACK_BIT_LEFT) DrawGroundSprite(rti->base_sprites.single_w);
if (track & TRACK_BIT_RIGHT) DrawGroundSprite(rti->base_sprites.single_e);
}
-
- if (_debug_pbs_level >= 1) {
- byte pbs = PBSTileReserved(ti->tile) & track;
- if (pbs & TRACK_BIT_DIAG1) DrawGroundSprite(rti->base_sprites.single_y | PALETTE_CRASH);
- if (pbs & TRACK_BIT_DIAG2) DrawGroundSprite(rti->base_sprites.single_x | PALETTE_CRASH);
- if (pbs & TRACK_BIT_UPPER) DrawGroundSprite(rti->base_sprites.single_n | PALETTE_CRASH);
- if (pbs & TRACK_BIT_LOWER) DrawGroundSprite(rti->base_sprites.single_s | PALETTE_CRASH);
- if (pbs & TRACK_BIT_LEFT) DrawGroundSprite(rti->base_sprites.single_w | PALETTE_CRASH);
- if (pbs & TRACK_BIT_RIGHT) DrawGroundSprite(rti->base_sprites.single_e | PALETTE_CRASH);
- }
}
static void DrawTile_Track(TileInfo *ti)
@@ -1526,16 +1485,6 @@ static void DrawTile_Track(TileInfo *ti)
DrawGroundSprite(image);
- if (_debug_pbs_level >= 1) {
- byte pbs = PBSTileReserved(ti->tile);
- if (pbs & TRACK_BIT_DIAG1) DrawGroundSprite(rti->base_sprites.single_y | PALETTE_CRASH);
- if (pbs & TRACK_BIT_DIAG2) DrawGroundSprite(rti->base_sprites.single_x | PALETTE_CRASH);
- if (pbs & TRACK_BIT_UPPER) DrawGroundSprite(rti->base_sprites.single_n | PALETTE_CRASH);
- if (pbs & TRACK_BIT_LOWER) DrawGroundSprite(rti->base_sprites.single_s | PALETTE_CRASH);
- if (pbs & TRACK_BIT_LEFT) DrawGroundSprite(rti->base_sprites.single_w | PALETTE_CRASH);
- if (pbs & TRACK_BIT_RIGHT) DrawGroundSprite(rti->base_sprites.single_e | PALETTE_CRASH);
- }
-
for (; drss->image != 0; drss++) {
DrawSpecialBuilding(drss->image, type < 4 ? rti->total_offset : 0, ti,
drss->subcoord_x, drss->subcoord_y, 0,
@@ -1595,11 +1544,6 @@ typedef struct SetSignalsData {
bool stop;
bool has_presignal;
- bool has_pbssignal;
- // lowest 2 bits = amount of pbs signals in the block, clamped at 2
- // bit 2 = there is a pbs entry signal in this block
- // bit 3 = there is a pbs exit signal in this block
-
// presignal info
int presignal_exits;
int presignal_exits_free;
@@ -1608,10 +1552,6 @@ typedef struct SetSignalsData {
byte bit[NUM_SSD_ENTRY];
TileIndex tile[NUM_SSD_ENTRY];
- int pbs_cur;
- // these are used to keep track of all signals in the block
- TileIndex pbs_tile[NUM_SSD_ENTRY];
-
// these are used to keep track of the stack that modifies presignals recursively
TileIndex next_tile[NUM_SSD_STACK];
byte next_dir[NUM_SSD_STACK];
@@ -1631,32 +1571,15 @@ static bool SetSignalsEnumProc(TileIndex tile, SetSignalsData *ssd, int track, u
ssd->cur++;
}
- if (PBSIsPbsSignal(tile, ReverseTrackdir(track)))
- SETBIT(ssd->has_pbssignal, 2);
-
// remember if this block has a presignal.
ssd->has_presignal |= (_m[tile].m4&1);
}
- if (PBSIsPbsSignal(tile, ReverseTrackdir(track)) || PBSIsPbsSignal(tile, track)) {
- byte num = ssd->has_pbssignal & 3;
- num = clamp(num + 1, 0, 2);
- ssd->has_pbssignal &= ~3;
- ssd->has_pbssignal |= num;
- }
-
- ssd->pbs_tile[ssd->pbs_cur] = tile; // remember the tile index
- ssd->pbs_cur++;
-
- if (HasSignalOnTrackdir(tile, track)) {
- if (_m[tile].m4&2) {
- // this is an exit signal that points out from the segment
- ssd->presignal_exits++;
- if (GetSignalState(tile, track) != SIGNAL_STATE_RED)
- ssd->presignal_exits_free++;
- }
- if (PBSIsPbsSignal(tile, track))
- SETBIT(ssd->has_pbssignal, 3);
+ if (HasSignalOnTrackdir(tile, track) && (_m[tile].m4 & 2)) {
+ // this is an exit signal that points out from the segment
+ ssd->presignal_exits++;
+ if (GetSignalState(tile, track) != SIGNAL_STATE_RED)
+ ssd->presignal_exits_free++;
}
return true;
@@ -1791,14 +1714,6 @@ static void ChangeSignalStates(SetSignalsData *ssd)
// there is at least one green exit signal OR
// there are no exit signals in the segment
- // convert the block to pbs, if needed
- if (_patches.auto_pbs_placement && !(ssd->stop) && (ssd->has_pbssignal == 0xE) && !ssd->has_presignal && (ssd->presignal_exits == 0)) // 0xE means at least 2 pbs signals, and at least 1 entry and 1 exit, see comments ssd->has_pbssignal
- for (i = 0; i != ssd->pbs_cur; i++) {
- TileIndex tile = ssd->pbs_tile[i];
- SB(_m[tile].m4, 0, 3, SIGTYPE_PBS);
- MarkTileDirtyByTile(tile);
- };
-
// then mark the signals in the segment accordingly
for (i = 0; i != ssd->cur; i++) {
TileIndex tile = ssd->tile[i];
@@ -1859,9 +1774,8 @@ bool UpdateSignalsOnSegment(TileIndex tile, byte direction)
for(;;) {
// go through one segment and update all signals pointing into that segment.
- ssd.cur = ssd.pbs_cur = ssd.presignal_exits = ssd.presignal_exits_free = 0;
+ ssd.cur = ssd.presignal_exits = ssd.presignal_exits_free = 0;
ssd.has_presignal = false;
- ssd.has_pbssignal = false;
FollowTrack(tile, 0xC000 | TRANSPORT_RAIL, direction, (TPFEnumProc*)SetSignalsEnumProc, SetSignalsAfterProc, &ssd);
ChangeSignalStates(&ssd);
@@ -2126,16 +2040,14 @@ static void GetTileDesc_Track(TileIndex tile, TileDesc *td)
break;
case RAIL_TYPE_SIGNALS: {
- const StringID signal_type[7] = {
+ const StringID signal_type[] = {
STR_RAILROAD_TRACK_WITH_NORMAL_SIGNALS,
STR_RAILROAD_TRACK_WITH_PRESIGNALS,
STR_RAILROAD_TRACK_WITH_EXITSIGNALS,
- STR_RAILROAD_TRACK_WITH_COMBOSIGNALS,
- STR_RAILROAD_TRACK_WITH_PBSSIGNALS,
- STR_NULL, STR_NULL
+ STR_RAILROAD_TRACK_WITH_COMBOSIGNALS
};
- td->str = signal_type[GB(_m[tile].m4, 0, 3)];
+ td->str = signal_type[GB(_m[tile].m4, 0, 2)];
break;
}
@@ -2199,8 +2111,6 @@ static uint32 VehicleEnter_Track(Vehicle *v, TileIndex tile, int x, int y)
} else if (_fractcoords_enter[dir] == fract_coord) {
if (_enter_directions[dir] == v->direction) {
/* enter the depot */
- if (v->next == NULL)
- PBSClearTrack(v->tile, FIND_FIRST_BIT(v->u.rail.track));
v->u.rail.track = 0x80,
v->vehstatus |= VS_HIDDEN; /* hide it */
v->direction ^= 4;
diff --git a/road_cmd.c b/road_cmd.c
index 0a0dad432..a2f6c730d 100644
--- a/road_cmd.c
+++ b/road_cmd.c
@@ -15,8 +15,6 @@
#include "gfx.h"
#include "sound.h"
#include "depot.h"
-#include "pbs.h"
-#include "debug.h"
/* When true, GetTrackStatus for roads will treat roads under reconstruction
* as normal roads instead of impassable. This is used when detecting whether
@@ -251,7 +249,6 @@ int32 CmdRemoveRoad(int x, int y, uint32 flags, uint32 p1, uint32 p2)
cost = _price.remove_road * 2;
if (flags & DC_EXEC) {
- byte pbs_track = PBSTileReserved(tile);
ChangeTownRating(t, -road_remove_cost[(byte)edge_road], RATING_ROAD_MINIMUM);
ModifyTile(tile,
@@ -260,8 +257,6 @@ int32 CmdRemoveRoad(int x, int y, uint32 flags, uint32 p1, uint32 p2)
_m[tile].m4 & 0xF, /* map3_lo */
c /* map5 */
);
- if (pbs_track != 0)
- PBSReserveTrack(tile, FIND_FIRST_BIT(pbs_track));
}
return cost;
} else
@@ -404,7 +399,6 @@ int32 CmdBuildRoad(int x, int y, uint32 flags, uint32 p1, uint32 p2)
goto do_clear;
if (flags & DC_EXEC) {
- byte pbs_track = PBSTileReserved(tile);
ModifyTile(tile,
MP_SETTYPE(MP_STREET) |
MP_MAP2 | MP_MAP3LO | MP_MAP3HI | MP_MAP5,
@@ -413,8 +407,6 @@ int32 CmdBuildRoad(int x, int y, uint32 flags, uint32 p1, uint32 p2)
_m[tile].m3 & 0xF, /* map3_hi */
m5 /* map5 */
);
- if (pbs_track != 0)
- PBSReserveTrack(tile, FIND_FIRST_BIT(pbs_track));
}
return _price.build_road * 2;
} else if (ti.type == MP_TUNNELBRIDGE) {
@@ -854,17 +846,6 @@ static void DrawTile_Road(TileInfo *ti)
}
DrawGroundSprite(image);
-
- if (_debug_pbs_level >= 1) {
- byte pbs = PBSTileReserved(ti->tile);
- if (pbs & TRACK_BIT_DIAG1) DrawGroundSprite(0x3ED | PALETTE_CRASH);
- if (pbs & TRACK_BIT_DIAG2) DrawGroundSprite(0x3EE | PALETTE_CRASH);
- if (pbs & TRACK_BIT_UPPER) DrawGroundSprite(0x3EF | PALETTE_CRASH);
- if (pbs & TRACK_BIT_LOWER) DrawGroundSprite(0x3F0 | PALETTE_CRASH);
- if (pbs & TRACK_BIT_LEFT) DrawGroundSprite(0x3F2 | PALETTE_CRASH);
- if (pbs & TRACK_BIT_RIGHT) DrawGroundSprite(0x3F1 | PALETTE_CRASH);
- }
-
} else {
uint32 ormod;
PlayerID player;
diff --git a/roadveh_cmd.c b/roadveh_cmd.c
index ac5c40248..0bb9bf321 100644
--- a/roadveh_cmd.c
+++ b/roadveh_cmd.c
@@ -1062,7 +1062,7 @@ static int RoadFindPathToDest(Vehicle *v, TileIndex tile, int enterdir)
trackdir = DiagdirToDiagTrackdir(enterdir);
//debug("Finding path. Enterdir: %d, Trackdir: %d", enterdir, trackdir);
- ftd = NPFRouteToStationOrTile(tile - TileOffsByDir(enterdir), trackdir, &fstd, TRANSPORT_ROAD, v->owner, INVALID_RAILTYPE, PBS_MODE_NONE);
+ ftd = NPFRouteToStationOrTile(tile - TileOffsByDir(enterdir), trackdir, &fstd, TRANSPORT_ROAD, v->owner, INVALID_RAILTYPE);
if (ftd.best_trackdir == 0xff) {
/* We are already at our target. Just do something */
//TODO: maybe display error?
@@ -1140,7 +1140,7 @@ static uint RoadFindPathToStation(const Vehicle *v, TileIndex tile)
fstd.dest_coords = tile;
fstd.station_index = -1; // indicates that the destination is a tile, not a station
- return NPFRouteToStationOrTile(v->tile, trackdir, &fstd, TRANSPORT_ROAD, v->owner, INVALID_RAILTYPE, PBS_MODE_NONE).best_path_dist;
+ return NPFRouteToStationOrTile(v->tile, trackdir, &fstd, TRANSPORT_ROAD, v->owner, INVALID_RAILTYPE).best_path_dist;
}
#endif
diff --git a/saveload.c b/saveload.c
index 386233160..8e00bcfcd 100644
--- a/saveload.c
+++ b/saveload.c
@@ -29,7 +29,7 @@
#include <setjmp.h>
enum {
- SAVEGAME_VERSION = 20,
+ SAVEGAME_VERSION = 21,
};
diff --git a/settings.c b/settings.c
index 7463ad522..ef0b2ed4a 100644
--- a/settings.c
+++ b/settings.c
@@ -868,7 +868,6 @@ static const SettingDesc patch_player_settings[] = {
// Non-static, needed in network_server.c
const SettingDesc patch_settings[] = {
{"build_on_slopes", SDT_BOOL, (void*)true, &_patches.build_on_slopes, NULL},
- {"auto_pbs_placement", SDT_BOOL, (void*)true, &_patches.auto_pbs_placement, NULL},
{"mammoth_trains", SDT_BOOL, (void*)true, &_patches.mammoth_trains, NULL},
{"join_stations", SDT_BOOL, (void*)true, &_patches.join_stations, NULL},
{"station_spread", SDT_UINT8, (void*)12, &_patches.station_spread, NULL},
diff --git a/settings_gui.c b/settings_gui.c
index 64f1b3034..93cfaf85b 100644
--- a/settings_gui.c
+++ b/settings_gui.c
@@ -701,7 +701,6 @@ static const PatchEntry _patches_construction[] = {
{PE_BOOL, 0, STR_CONFIG_PATCHES_SMALL_AIRPORTS, "always_small_airport", &_patches.always_small_airport, 0, 0, 0, NULL},
{PE_UINT8, PF_PLAYERBASED, STR_CONFIG_PATCHES_DRAG_SIGNALS_DENSITY, "drag_signals_density", &_patches.drag_signals_density, 1, 20, 1, NULL},
- {PE_BOOL, 0, STR_CONFIG_AUTO_PBS_PLACEMENT, "auto_pbs_placement", &_patches.auto_pbs_placement, 1, 20, 1, NULL},
};
static const PatchEntry _patches_vehicles[] = {
diff --git a/ship_cmd.c b/ship_cmd.c
index b73b48380..904ffafa3 100644
--- a/ship_cmd.c
+++ b/ship_cmd.c
@@ -543,7 +543,7 @@ static int ChooseShipTrack(Vehicle *v, TileIndex tile, int enterdir, uint tracks
NPFFillWithOrderData(&fstd, v);
- ftd = NPFRouteToStationOrTile(src_tile, trackdir, &fstd, TRANSPORT_WATER, v->owner, INVALID_RAILTYPE, PBS_MODE_NONE);
+ ftd = NPFRouteToStationOrTile(src_tile, trackdir, &fstd, TRANSPORT_WATER, v->owner, INVALID_RAILTYPE);
if (ftd.best_trackdir != 0xff) {
/* If ftd.best_bird_dist is 0, we found our target and ftd.best_trackdir contains
diff --git a/station_cmd.c b/station_cmd.c
index 67e70cde5..c4cc83576 100644
--- a/station_cmd.c
+++ b/station_cmd.c
@@ -25,7 +25,6 @@
#include "airport.h"
#include "sprite.h"
#include "depot.h"
-#include "pbs.h"
#include "train.h"
enum {
@@ -2072,16 +2071,6 @@ static void DrawTile_Station(TileInfo *ti)
// but this is something else. If AI builds station with 114 it looks all weird
DrawGroundSprite(image);
- if (_debug_pbs_level >= 1) {
- byte pbs = PBSTileReserved(ti->tile);
- if (pbs & TRACK_BIT_DIAG1) DrawGroundSprite(rti->base_sprites.single_y | PALETTE_CRASH);
- if (pbs & TRACK_BIT_DIAG2) DrawGroundSprite(rti->base_sprites.single_x | PALETTE_CRASH);
- if (pbs & TRACK_BIT_UPPER) DrawGroundSprite(rti->base_sprites.single_n | PALETTE_CRASH);
- if (pbs & TRACK_BIT_LOWER) DrawGroundSprite(rti->base_sprites.single_s | PALETTE_CRASH);
- if (pbs & TRACK_BIT_LEFT) DrawGroundSprite(rti->base_sprites.single_w | PALETTE_CRASH);
- if (pbs & TRACK_BIT_RIGHT) DrawGroundSprite(rti->base_sprites.single_e | PALETTE_CRASH);
- }
-
foreach_draw_tile_seq(dtss, t->seq) {
image = dtss->image + relocation;
image += offset;
diff --git a/train_cmd.c b/train_cmd.c
index 4b77368cc..131e21cd2 100644
--- a/train_cmd.c
+++ b/train_cmd.c
@@ -19,7 +19,6 @@
#include "player.h"
#include "sound.h"
#include "depot.h"
-#include "debug.h"
#include "waypoint.h"
#include "vehicle_gui.h"
#include "train.h"
@@ -1552,81 +1551,10 @@ static void AdvanceWagons(Vehicle *v, bool before)
}
}
-static TileIndex GetVehicleTileOutOfTunnel(const Vehicle* v, bool reverse)
-{
- TileIndex tile;
- byte direction = (!reverse) ? DirToDiagdir(v->direction) : ReverseDiagdir(v->direction >> 1);
- TileIndexDiff delta = TileOffsByDir(direction);
-
- if (v->u.rail.track != 0x40) return v->tile;
-
- for (tile = v->tile;; tile += delta) {
- if (IsTunnelTile(tile) && GB(_m[tile].m5, 0, 2) != direction && GetTileZ(tile) == v->z_pos)
- break;
- }
- return tile;
-}
-
static void ReverseTrainDirection(Vehicle *v)
{
int l = 0, r = -1;
Vehicle *u;
- TileIndex tile;
- Trackdir trackdir;
- TileIndex pbs_end_tile = v->u.rail.pbs_end_tile; // these may be changed, and we may need
- Trackdir pbs_end_trackdir = v->u.rail.pbs_end_trackdir; // the old values, so cache them
-
- u = GetLastVehicleInChain(v);
- tile = GetVehicleTileOutOfTunnel(u, false);
- trackdir = ReverseTrackdir(GetVehicleTrackdir(u));
-
- if (PBSTileReserved(tile) & (1 << TrackdirToTrack(trackdir))) {
- NPFFindStationOrTileData fstd;
- NPFFoundTargetData ftd;
-
- NPFFillWithOrderData(&fstd, v);
-
- tile = GetVehicleTileOutOfTunnel(u, true);
-
- DEBUG(pbs, 2) ("pbs: (%i) choose reverse (RV), tile:%x, trackdir:%i",v->unitnumber, u->tile, trackdir);
- ftd = NPFRouteToStationOrTile(tile, trackdir, &fstd, TRANSPORT_RAIL, v->owner, v->u.rail.railtype, PBS_MODE_ANY);
-
- if (ftd.best_trackdir == 0xFF) {
- DEBUG(pbs, 0) ("pbs: (%i) no nodes encountered (RV)", v->unitnumber);
- CLRBIT(v->u.rail.flags, VRF_REVERSING);
- return;
- }
-
- // we found a way out of the pbs block
- if (NPFGetFlag(&ftd.node, NPF_FLAG_PBS_EXIT)) {
- if (NPFGetFlag(&ftd.node, NPF_FLAG_PBS_BLOCKED)) {
- CLRBIT(v->u.rail.flags, VRF_REVERSING);
- return;
- }
- }
-
- v->u.rail.pbs_end_tile = ftd.node.tile;
- v->u.rail.pbs_end_trackdir = ftd.node.direction;
- }
-
- tile = GetVehicleTileOutOfTunnel(v, false);
- trackdir = GetVehicleTrackdir(v);
-
- if (v->u.rail.pbs_status == PBS_STAT_HAS_PATH) {
- TileIndex tile = AddTileIndexDiffCWrap(v->tile, TileIndexDiffCByDir(TrackdirToExitdir(trackdir)));
- uint32 ts;
- assert(tile != INVALID_TILE);
- ts = GetTileTrackStatus(tile, TRANSPORT_RAIL);
- ts &= TrackdirReachesTrackdirs(trackdir);
- assert(ts != 0 && KillFirstBit2x64(ts) == 0);
- trackdir = FindFirstBit2x64(ts);
- PBSClearPath(tile, trackdir, pbs_end_tile, pbs_end_trackdir);
- v->u.rail.pbs_status = PBS_STAT_NONE;
- } else if (PBSTileReserved(tile) & (1 << TrackdirToTrack(trackdir))) {
- PBSClearPath(tile, trackdir, pbs_end_tile, pbs_end_trackdir);
- if (v->u.rail.track != 0x40)
- PBSReserveTrack(tile, trackdir & 7);
- };
if (IsTileDepotType(v->tile, TRANSPORT_RAIL))
InvalidateWindow(WC_VEHICLE_DEPOT, v->tile);
@@ -2040,8 +1968,6 @@ static bool CheckTrainStayInDepot(Vehicle *v)
}
if (v->u.rail.force_proceed == 0) {
- Trackdir trackdir = GetVehicleTrackdir(v);
-
if (++v->load_unload_time_rem < 37) {
InvalidateWindowClasses(WC_TRAINS_LIST);
return true;
@@ -2049,35 +1975,12 @@ static bool CheckTrainStayInDepot(Vehicle *v)
v->load_unload_time_rem = 0;
- if (PBSIsPbsSegment(v->tile, trackdir)) {
- NPFFindStationOrTileData fstd;
- NPFFoundTargetData ftd;
-
- if (PBSTileUnavail(v->tile) & (1 << trackdir)) return true;
-
- NPFFillWithOrderData(&fstd, v);
-
- DEBUG(pbs, 2) ("pbs: (%i) choose depot (DP), tile:%x, trackdir:%i",v->unitnumber, v->tile, trackdir);
- ftd = NPFRouteToStationOrTile(v->tile, trackdir, &fstd, TRANSPORT_RAIL, v->owner, v->u.rail.railtype, PBS_MODE_GREEN);
-
- // we found a way out of the pbs block
- if (NPFGetFlag(&ftd.node, NPF_FLAG_PBS_EXIT)) {
- if (NPFGetFlag(&ftd.node, NPF_FLAG_PBS_BLOCKED) || NPFGetFlag(&ftd.node, NPF_FLAG_PBS_RED)) {
- return true;
- } else {
- v->u.rail.pbs_end_tile = ftd.node.tile;
- v->u.rail.pbs_end_trackdir = ftd.node.direction;
- goto green;
- }
- }
- }
-
if (UpdateSignalsOnSegment(v->tile, v->direction)) {
InvalidateWindowClasses(WC_TRAINS_LIST);
return true;
}
}
-green:
+
VehicleServiceInDepot(v);
InvalidateWindowClasses(WC_TRAINS_LIST);
TrainPlayLeaveStationSound(v);
@@ -2215,29 +2118,13 @@ static byte ChooseTrainTrack(Vehicle *v, TileIndex tile, int enterdir, TrackdirB
NPFFindStationOrTileData fstd;
NPFFoundTargetData ftd;
Trackdir trackdir;
- uint16 pbs_tracks;
NPFFillWithOrderData(&fstd, v);
/* The enterdir for the new tile, is the exitdir for the old tile */
trackdir = GetVehicleTrackdir(v);
assert(trackdir != 0xff);
- pbs_tracks = PBSTileReserved(tile);
- pbs_tracks |= pbs_tracks << 8;
- pbs_tracks &= TrackdirReachesTrackdirs(trackdir);
- if (pbs_tracks || (v->u.rail.pbs_status == PBS_STAT_NEED_PATH)) {
- DEBUG(pbs, 2) ("pbs: (%i) choosefromblock, tile_org:%x tile_dst:%x trackdir:%i pbs_tracks:%i",v->unitnumber, tile,tile - TileOffsByDir(enterdir), trackdir, pbs_tracks);
- // clear the currently planned path
- if (v->u.rail.pbs_status != PBS_STAT_NEED_PATH) PBSClearPath(tile, FindFirstBit2x64(pbs_tracks), v->u.rail.pbs_end_tile, v->u.rail.pbs_end_trackdir);
-
- // try to find a route to a green exit signal
- ftd = NPFRouteToStationOrTile(tile - TileOffsByDir(enterdir), trackdir, &fstd, TRANSPORT_RAIL, v->owner, v->u.rail.railtype, PBS_MODE_ANY);
-
- v->u.rail.pbs_end_tile = ftd.node.tile;
- v->u.rail.pbs_end_trackdir = ftd.node.direction;
-
- } else
- ftd = NPFRouteToStationOrTile(tile - TileOffsByDir(enterdir), trackdir, &fstd, TRANSPORT_RAIL, v->owner, v->u.rail.railtype, PBS_MODE_NONE);
+ ftd = NPFRouteToStationOrTile(tile - TileOffsByDir(enterdir), trackdir, &fstd, TRANSPORT_RAIL, v->owner, v->u.rail.railtype);
if (ftd.best_trackdir == 0xff) {
/* We are already at our target. Just do something */
@@ -2317,8 +2204,7 @@ static bool CheckReverseTrain(Vehicle *v)
assert(trackdir != 0xff);
assert(trackdir_rev != 0xff);
- ftd = NPFRouteToStationOrTileTwoWay(v->tile, trackdir, last->tile, trackdir_rev, &fstd, TRANSPORT_RAIL, v->owner, v->u.rail.railtype, PBS_MODE_NONE);
-
+ ftd = NPFRouteToStationOrTileTwoWay(v->tile, trackdir, last->tile, trackdir_rev, &fstd, TRANSPORT_RAIL, v->owner, v->u.rail.railtype);
if (ftd.best_bird_dist != 0) {
/* We didn't find anything, just keep on going straight ahead */
reverse_best = false;
@@ -2906,7 +2792,7 @@ static void TrainController(Vehicle *v)
} else {
/* is not inside depot */
- if ((prev == NULL) && (!TrainCheckIfLineEnds(v)))
+ if (!TrainCheckIfLineEnds(v))
return;
r = VehicleEnterTile(v, gp.new_tile, gp.x, gp.y);
@@ -2961,56 +2847,11 @@ static void TrainController(Vehicle *v)
}
if (prev == NULL) {
- byte trackdir;
/* Currently the locomotive is active. Determine which one of the
* available tracks to choose */
chosen_track = 1 << ChooseTrainTrack(v, gp.new_tile, enterdir, bits);
assert(chosen_track & tracks);
- trackdir = TrackEnterdirToTrackdir(FIND_FIRST_BIT(chosen_track), enterdir);
- assert(trackdir != 0xff);
-
- if (PBSIsPbsSignal(gp.new_tile,trackdir) && PBSIsPbsSegment(gp.new_tile,trackdir)) {
- // encountered a pbs signal, and possible a pbs block
- DEBUG(pbs, 3) ("pbs: (%i) arrive AT signal, tile:%x pbs_stat:%i",v->unitnumber, gp.new_tile, v->u.rail.pbs_status);
-
- if (v->u.rail.pbs_status == PBS_STAT_NONE) {
- // we havent planned a path already, so try to find one now
- NPFFindStationOrTileData fstd;
- NPFFoundTargetData ftd;
-
- NPFFillWithOrderData(&fstd, v);
-
- DEBUG(pbs, 2) ("pbs: (%i) choose signal (TC), tile:%x, trackdir:%i",v->unitnumber, gp.new_tile, trackdir);
- ftd = NPFRouteToStationOrTile(gp.new_tile, trackdir, &fstd, TRANSPORT_RAIL, v->owner, v->u.rail.railtype, PBS_MODE_GREEN);
-
- if (v->u.rail.force_proceed != 0)
- goto green_light;
-
- if (ftd.best_trackdir == 0xFF)
- goto red_light;
-
- // we found a way out of the pbs block
- if (NPFGetFlag(&ftd.node, NPF_FLAG_PBS_EXIT)) {
- if (NPFGetFlag(&ftd.node, NPF_FLAG_PBS_BLOCKED) || NPFGetFlag(&ftd.node, NPF_FLAG_PBS_RED))
- goto red_light;
- else {
- v->u.rail.pbs_end_tile = ftd.node.tile;
- v->u.rail.pbs_end_trackdir = ftd.node.direction;
- goto green_light;
- }
-
- };
-
- } else {
- // we have already planned a path through this pbs block
- // on entering the block, we reset our status
- v->u.rail.pbs_status = PBS_STAT_NONE;
- goto green_light;
- };
- DEBUG(pbs, 3) ("pbs: (%i) no green light found, or was no pbs-block",v->unitnumber);
- };
-
/* Check if it's a red signal and that force proceed is not clicked. */
if ( (tracks>>16)&chosen_track && v->u.rail.force_proceed == 0) goto red_light;
} else {
@@ -3019,9 +2860,6 @@ static void TrainController(Vehicle *v)
/* The wagon is active, simply follow the prev vehicle. */
chosen_track = (byte)(_matching_tracks[GetDirectionToVehicle(prev, gp.x, gp.y)] & bits);
}
-green_light:
- if (v->next == NULL)
- PBSClearTrack(gp.old_tile, FIND_FIRST_BIT(v->u.rail.track));
/* make sure chosen track is a valid track */
assert(chosen_track==1 || chosen_track==2 || chosen_track==4 || chosen_track==8 || chosen_track==16 || chosen_track==32);
@@ -3050,12 +2888,12 @@ green_light:
}
if (IsFrontEngine(v))
- TrainMovedChangeSignals(gp.new_tile, enterdir);
+ TrainMovedChangeSignals(gp.new_tile, enterdir);
/* Signals can only change when the first
* (above) or the last vehicle moves. */
if (v->next == NULL)
- TrainMovedChangeSignals(gp.old_tile, (enterdir) ^ 2);
+ TrainMovedChangeSignals(gp.old_tile, (enterdir) ^ 2);
if (prev == NULL) {
AffectSpeedByDirChange(v, chosen_dir);
@@ -3164,17 +3002,6 @@ static void DeleteLastWagon(Vehicle *v)
EndVehicleMove(v);
DeleteVehicle(v);
- // clear up reserved pbs tracks
- if (PBSTileReserved(v->tile) & v->u.rail.track) {
- if (v == u) {
- PBSClearPath(v->tile, FIND_FIRST_BIT(v->u.rail.track), v->u.rail.pbs_end_tile, v->u.rail.pbs_end_trackdir);
- PBSClearPath(v->tile, FIND_FIRST_BIT(v->u.rail.track) + 8, v->u.rail.pbs_end_tile, v->u.rail.pbs_end_trackdir);
- };
- if (v->tile != u->tile) {
- PBSClearTrack(v->tile, FIND_FIRST_BIT(v->u.rail.track));
- };
- }
-
if (!(v->u.rail.track & 0xC0))
SetSignalsOnBothDir(v->tile, FIND_FIRST_BIT(v->u.rail.track));
@@ -3302,7 +3129,6 @@ static bool TrainCheckIfLineEnds(Vehicle *v)
uint16 break_speed;
DiagDirection t;
uint32 ts;
- byte trackdir;
t = v->breakdown_ctr;
if (t > 1) {
@@ -3339,12 +3165,6 @@ static bool TrainCheckIfLineEnds(Vehicle *v)
// determine the track status on the next tile.
ts = GetTileTrackStatus(tile, TRANSPORT_RAIL) & _reachable_tracks[t];
- // if there are tracks on the new tile, pick one (trackdir will only be used when its a signal tile, in which case only 1 trackdir is accessible for us)
- if (ts & TRACKDIR_BIT_MASK)
- trackdir = FindFirstBit2x64(ts & TRACKDIR_BIT_MASK);
- else
- trackdir = INVALID_TRACKDIR;
-
/* Calc position within the current tile ?? */
x = v->x_pos & 0xF;
y = v->y_pos & 0xF;
@@ -3400,28 +3220,6 @@ static bool TrainCheckIfLineEnds(Vehicle *v)
return false;
}
- if (v->u.rail.pbs_status == PBS_STAT_HAS_PATH)
- return true;
-
- if ((trackdir != INVALID_TRACKDIR) && (PBSIsPbsSignal(tile,trackdir) && PBSIsPbsSegment(tile,trackdir)) && !(IsTileType(v->tile, MP_STATION) && (v->current_order.station == _m[v->tile].m2))) {
- NPFFindStationOrTileData fstd;
- NPFFoundTargetData ftd;
-
- NPFFillWithOrderData(&fstd, v);
-
- DEBUG(pbs, 2) ("pbs: (%i) choose signal (CEOL), tile:%x trackdir:%i", v->unitnumber, tile, trackdir);
- ftd = NPFRouteToStationOrTile(tile, trackdir, &fstd, TRANSPORT_RAIL, v->owner, v->u.rail.railtype, PBS_MODE_GREEN);
-
- if (ftd.best_trackdir != 0xFF && NPFGetFlag(&ftd.node, NPF_FLAG_PBS_EXIT)) {
- if (!(NPFGetFlag(&ftd.node, NPF_FLAG_PBS_BLOCKED) || NPFGetFlag(&ftd.node, NPF_FLAG_PBS_RED))) {
- v->u.rail.pbs_status = PBS_STAT_HAS_PATH;
- v->u.rail.pbs_end_tile = ftd.node.tile;
- v->u.rail.pbs_end_trackdir = ftd.node.direction;
- return true;
- }
- };
- };
-
// slow down
v->vehstatus |= VS_TRAIN_SLOWING;
break_speed = _breakdown_speeds[x & 0xF];
@@ -3578,8 +3376,6 @@ static void CheckIfTrainNeedsService(Vehicle *v)
const Depot* depot;
TrainFindDepotData tfdd;
- if (PBSTileReserved(v->tile) & v->u.rail.track) return;
- if (v->u.rail.pbs_status == PBS_STAT_HAS_PATH) return;
if (_patches.servint_trains == 0) return;
if (!VehicleNeedsService(v)) return;
if (v->vehstatus & VS_STOPPED) return;
diff --git a/tunnelbridge_cmd.c b/tunnelbridge_cmd.c
index 524a1a62c..6d40c28f9 100644
--- a/tunnelbridge_cmd.c
+++ b/tunnelbridge_cmd.c
@@ -18,8 +18,6 @@
#include "player.h"
#include "town.h"
#include "sound.h"
-#include "pbs.h"
-#include "debug.h"
#include "variables.h"
#include "bridge.h"
#include "train.h"
@@ -204,7 +202,6 @@ int32 CmdBuildBridge(int x, int y, uint32 flags, uint32 p1, uint32 p2)
uint i;
int32 cost, terraformcost, ret;
bool allow_on_slopes;
- bool reserved = false;
SET_EXPENSES_TYPE(EXPENSES_CONSTRUCTION);
@@ -352,7 +349,6 @@ int32 CmdBuildBridge(int x, int y, uint32 flags, uint32 p1, uint32 p2)
if (ti.map5 != 1) goto not_valid_below;
}
m5 = 0xE0;
- reserved = PBSTileReserved(ti.tile) != 0;
} else if (ti.type == MP_STREET) {
if (direction == 0) {
if (ti.map5 != 5) goto not_valid_below;
@@ -402,16 +398,6 @@ not_valid_below:;
_m[ti.tile].m2 = (bridge_type << 4) | m5;
SB(_m[ti.tile].m3, 4, 4, railtype);
- if (ti.type == MP_RAILWAY) {
- // Set or clear PBS reservation status. direction here is of
- // the bridge, not the track below.
- if (reserved) {
- PBSReserveTrack(ti.tile, direction ? TRACK_DIAG1 : TRACK_DIAG2);
- } else {
- PBSClearTrack(ti.tile, direction ? TRACK_DIAG1 : TRACK_DIAG2);
- }
- }
-
MarkTileDirtyByTile(ti.tile);
}
}
@@ -807,7 +793,6 @@ static int32 DoClearBridge(TileIndex tile, uint32 flags)
byte m5;
uint c = tile;
uint16 new_data;
- byte pbs;
//checks if the owner is town then decrease town rating by RATING_TUNNEL_BRIDGE_DOWN_STEP until
// you have a "Poor" (0) town rating
@@ -816,7 +801,6 @@ static int32 DoClearBridge(TileIndex tile, uint32 flags)
do {
m5 = _m[c].m5;
- pbs = PBSTileReserved(c);
if (m5 & 0x40) {
if (m5 & 0x20) {
@@ -831,8 +815,6 @@ static int32 DoClearBridge(TileIndex tile, uint32 flags)
_m[c].m5 = (byte)new_data;
_m[c].m2 = 0;
_m[c].m4 &= 0x0F;
- if (direction ? HASBIT(pbs,0) : HASBIT(pbs,1))
- PBSReserveTrack(c, direction ? 0 : 1);
MarkTileDirtyByTile(c);
@@ -1212,16 +1194,6 @@ static void DrawTile_TunnelBridge(TileInfo *ti)
}
}
}
-
- if (_debug_pbs_level >= 1) {
- byte pbs = PBSTileReserved(ti->tile);
- if (pbs & TRACK_BIT_DIAG1) DrawGroundSprite(0x3ED | PALETTE_CRASH);
- if (pbs & TRACK_BIT_DIAG2) DrawGroundSprite(0x3EE | PALETTE_CRASH);
- if (pbs & TRACK_BIT_UPPER) DrawGroundSprite(0x3EF | PALETTE_CRASH);
- if (pbs & TRACK_BIT_LOWER) DrawGroundSprite(0x3F0 | PALETTE_CRASH);
- if (pbs & TRACK_BIT_LEFT) DrawGroundSprite(0x3F2 | PALETTE_CRASH);
- if (pbs & TRACK_BIT_RIGHT) DrawGroundSprite(0x3F1 | PALETTE_CRASH);
- }
}
static uint GetSlopeZ_TunnelBridge(const TileInfo* ti)
@@ -1504,8 +1476,6 @@ static uint32 VehicleEnter_TunnelBridge(Vehicle *v, TileIndex tile, int x, int y
return 0;
}
if (fc == _tunnel_fractcoord_2[dir]) {
- if (v->next == NULL)
- PBSClearTrack(v->tile, FIND_FIRST_BIT(v->u.rail.track));
v->tile = tile;
v->u.rail.track = 0x40;
v->vehstatus |= VS_HIDDEN;
diff --git a/variables.h b/variables.h
index c89386f91..7bf4a30bc 100644
--- a/variables.h
+++ b/variables.h
@@ -87,7 +87,6 @@ typedef struct Patches {
bool modified_catchment; //different-size catchment areas
bool vehicle_speed; // show vehicle speed
bool build_on_slopes; // allow building on slopes
- bool auto_pbs_placement;// automatic pbs signal placement
bool mammoth_trains; // allow very long trains
bool join_stations; // allow joining of train stations
bool full_load_any; // new full load calculation, any cargo must be full
diff --git a/vehicle.c b/vehicle.c
index bd69f6c95..198c8b140 100644
--- a/vehicle.c
+++ b/vehicle.c
@@ -2122,11 +2122,8 @@ static const SaveLoad _train_desc[] = {
SLE_CONDVARX(offsetof(Vehicle,u)+offsetof(VehicleRail,flags), SLE_UINT8, 2, 255),
SLE_CONDVARX(offsetof(Vehicle,u)+offsetof(VehicleRail,days_since_order_progr), SLE_UINT16, 2, 255),
- SLE_CONDVARX(offsetof(Vehicle,u)+offsetof(VehicleRail,pbs_status), SLE_UINT8, 2, 255),
- SLE_CONDVARX(offsetof(Vehicle,u)+offsetof(VehicleRail,pbs_end_tile), SLE_UINT32, 2, 255),
- SLE_CONDVARX(offsetof(Vehicle,u)+offsetof(VehicleRail,pbs_end_trackdir), SLE_UINT8, 2, 255),
-
- SLE_CONDARR(NullStruct, null, SLE_FILE_U8 | SLE_VAR_NULL, 2, 2, 255),
+ // reserve extra space in savegame here. (currently 8 bytes)
+ SLE_CONDARR(NullStruct, null, SLE_FILE_U8 | SLE_VAR_NULL, 8, 2, 255),
SLE_CONDREFX(offsetof(Vehicle,u)+offsetof(VehicleRail,other_multiheaded_part), REF_VEHICLE, 2, 19), // added with 17.1, but was blank since 2. Removed in 20
// reserve extra space in savegame here. (currently 3 bytes)
diff --git a/vehicle.h b/vehicle.h
index 7136ed172..ef66b63dc 100644
--- a/vehicle.h
+++ b/vehicle.h
@@ -74,10 +74,6 @@ typedef struct VehicleRail {
byte flags;
- byte pbs_status;
- TileIndex pbs_end_tile;
- Trackdir pbs_end_trackdir;
-
// Link between the two ends of a multiheaded engine
Vehicle *other_multiheaded_part;
} VehicleRail;
diff --git a/waypoint.c b/waypoint.c
index ee9e04ada..36af86cf4 100644
--- a/waypoint.c
+++ b/waypoint.c
@@ -14,7 +14,6 @@
#include "town.h"
#include "waypoint.h"
#include "variables.h"
-#include "pbs.h"
#include "table/sprites.h"
#include "table/strings.h"
@@ -209,7 +208,6 @@ int32 CmdBuildTrainWaypoint(int x, int y, uint32 flags, uint32 p1, uint32 p2)
if (flags & DC_EXEC) {
const StationSpec *spec = NULL;
- bool reserved = PBSTileReserved(tile) != 0;
ModifyTile(tile, MP_MAP2 | MP_MAP5, wp->index, RAIL_TYPE_WAYPOINT | dir);
if (GB(p1, 0, 8) < GetNumCustomStations(STAT_CLASS_WAYP))
@@ -228,12 +226,6 @@ int32 CmdBuildTrainWaypoint(int x, int y, uint32 flags, uint32 p1, uint32 p2)
wp->localidx = 0;
}
- if (reserved) {
- PBSReserveTrack(tile, dir);
- } else {
- PBSClearTrack(tile, dir);
- }
-
wp->deleted = 0;
wp->xy = tile;
wp->build_date = _date;
@@ -302,15 +294,9 @@ int32 RemoveTrainWaypoint(TileIndex tile, uint32 flags, bool justremove)
RedrawWaypointSign(wp);
if (justremove) {
- bool reserved = PBSTileReserved(tile) != 0;
ModifyTile(tile, MP_MAP2_CLEAR | MP_MAP5, 1<<direction);
CLRBIT(_m[tile].m3, 4);
_m[tile].m4 = 0;
- if (reserved) {
- PBSReserveTrack(tile, direction);
- } else {
- PBSClearTrack(tile, direction);
- }
} else {
DoClearSquare(tile);
SetSignalsOnBothDir(tile, direction);