Merge branch 'infrastructure_sharing-sx' into jgrpp
Conflicts: src/lang/english.txt src/saveload/extended_ver_sl.cpp src/saveload/extended_ver_sl.h src/signal.cpp src/table/settings.ini src/vehicle.cpp
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include "table/strings.h"
|
||||
#include "programmable_signals.h"
|
||||
#include "error.h"
|
||||
#include "infrastructure_func.h"
|
||||
|
||||
#include "safeguards.h"
|
||||
|
||||
@@ -308,7 +309,7 @@ static SigInfo ExploreSegment(Owner owner)
|
||||
|
||||
switch (GetTileType(tile)) {
|
||||
case MP_RAILWAY: {
|
||||
if (GetTileOwner(tile) != owner) continue; // do not propagate signals on others' tiles (remove for tracksharing)
|
||||
if (!IsOneSignalBlock(owner, GetTileOwner(tile))) continue;
|
||||
|
||||
if (IsRailDepot(tile)) {
|
||||
if (enterdir == INVALID_DIAGDIR) { // from 'inside' - train just entered or left the depot
|
||||
@@ -385,7 +386,7 @@ static SigInfo ExploreSegment(Owner owner)
|
||||
|
||||
case MP_STATION:
|
||||
if (!HasStationRail(tile)) continue;
|
||||
if (GetTileOwner(tile) != owner) continue;
|
||||
if (!IsOneSignalBlock(owner, GetTileOwner(tile))) continue;
|
||||
if (DiagDirToAxis(enterdir) != GetRailStationAxis(tile)) continue; // different axis
|
||||
if (IsStationTileBlocked(tile)) continue; // 'eye-candy' station tile
|
||||
|
||||
@@ -395,7 +396,7 @@ static SigInfo ExploreSegment(Owner owner)
|
||||
|
||||
case MP_ROAD:
|
||||
if (!IsLevelCrossing(tile)) continue;
|
||||
if (GetTileOwner(tile) != owner) continue;
|
||||
if (!IsOneSignalBlock(owner, GetTileOwner(tile))) continue;
|
||||
if (DiagDirToAxis(enterdir) == GetCrossingRoadAxis(tile)) continue; // different axis
|
||||
|
||||
if (!(info.flags & SF_TRAIN) && HasVehicleOnPos(tile, NULL, &TrainOnTileEnum)) info.flags |= SF_TRAIN;
|
||||
@@ -403,7 +404,7 @@ static SigInfo ExploreSegment(Owner owner)
|
||||
break;
|
||||
|
||||
case MP_TUNNELBRIDGE: {
|
||||
if (GetTileOwner(tile) != owner) continue;
|
||||
if (!IsOneSignalBlock(owner, GetTileOwner(tile))) continue;
|
||||
if (GetTunnelBridgeTransportType(tile) != TRANSPORT_RAIL) continue;
|
||||
DiagDirection dir = GetTunnelBridgeDirection(tile);
|
||||
|
||||
@@ -671,8 +672,9 @@ void AddTrackToSignalBuffer(TileIndex tile, Track track, Owner owner)
|
||||
DIAGDIR_SW, DIAGDIR_NW, DIAGDIR_NW, DIAGDIR_SW, DIAGDIR_NW, DIAGDIR_NE
|
||||
};
|
||||
|
||||
/* do not allow signal updates for two companies in one run */
|
||||
assert(_globset.IsEmpty() || owner == _last_owner);
|
||||
/* do not allow signal updates for two companies in one run,
|
||||
* if these companies are not part of the same signal block */
|
||||
assert(_globset.IsEmpty() || IsOneSignalBlock(owner, _last_owner));
|
||||
|
||||
_last_owner = owner;
|
||||
|
||||
@@ -696,8 +698,9 @@ void AddTrackToSignalBuffer(TileIndex tile, Track track, Owner owner)
|
||||
*/
|
||||
void AddSideToSignalBuffer(TileIndex tile, DiagDirection side, Owner owner)
|
||||
{
|
||||
/* do not allow signal updates for two companies in one run */
|
||||
assert(_globset.IsEmpty() || owner == _last_owner);
|
||||
/* do not allow signal updates for two companies in one run,
|
||||
* if these companies are not part of the same signal block */
|
||||
assert(_globset.IsEmpty() || IsOneSignalBlock(owner, _last_owner));
|
||||
|
||||
_last_owner = owner;
|
||||
|
||||
|
Reference in New Issue
Block a user