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:
@@ -19,6 +19,7 @@
|
||||
#include "../tunnelbridge.h"
|
||||
#include "../tunnelbridge_map.h"
|
||||
#include "../depot_map.h"
|
||||
#include "../infrastructure_func.h"
|
||||
#include "pf_performance_timer.hpp"
|
||||
|
||||
/**
|
||||
@@ -299,6 +300,11 @@ protected:
|
||||
m_err = EC_NO_WAY;
|
||||
return false;
|
||||
}
|
||||
/* road stops shouldn't be entered unless allowed to */
|
||||
if (!IsInfraTileUsageAllowed(VEH_ROAD, m_veh_owner, m_new_tile)) {
|
||||
m_err = EC_OWNER;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/* single tram bits can only be entered from one direction */
|
||||
@@ -317,8 +323,8 @@ protected:
|
||||
m_err = EC_NO_WAY;
|
||||
return false;
|
||||
}
|
||||
/* don't try to enter other company's depots */
|
||||
if (GetTileOwner(m_new_tile) != m_veh_owner) {
|
||||
/* don't try to enter other company's depots if not allowed */
|
||||
if (!IsInfraTileUsageAllowed(VEH_ROAD, m_veh_owner, m_new_tile)) {
|
||||
m_err = EC_OWNER;
|
||||
return false;
|
||||
}
|
||||
@@ -331,8 +337,8 @@ protected:
|
||||
}
|
||||
}
|
||||
|
||||
/* rail transport is possible only on tiles with the same owner as vehicle */
|
||||
if (IsRailTT() && GetTileOwner(m_new_tile) != m_veh_owner) {
|
||||
/* rail transport is possible only on allowed tiles */
|
||||
if (IsRailTT() && !IsInfraTileUsageAllowed(VEH_TRAIN, m_veh_owner, m_new_tile)) {
|
||||
/* different owner */
|
||||
m_err = EC_NO_WAY;
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user