Allow drive-through road stops to be one-way
This commit is contained in:
@@ -14,6 +14,8 @@
|
||||
#include "core/pool_type.hpp"
|
||||
#include "core/bitmath_func.hpp"
|
||||
#include "vehicle_type.h"
|
||||
#include "roadveh.h"
|
||||
#include "road_map.h"
|
||||
|
||||
typedef Pool<RoadStop, RoadStopID, 32, 64000> RoadStopPool;
|
||||
extern RoadStopPool _roadstop_pool;
|
||||
@@ -134,8 +136,19 @@ struct RoadStop : RoadStopPool::PoolItem<&_roadstop_pool> {
|
||||
return HasBit((int)dir, 1) ? this->west : this->east;
|
||||
}
|
||||
|
||||
inline const Entry *GetEntry(const RoadVehicle *rv) const {
|
||||
DiagDirection diag_dir = DirToDiagDir(rv->direction);
|
||||
return this->GetEntry(rv->overtaking != 0 ? ReverseDiagDir(diag_dir) : diag_dir);
|
||||
}
|
||||
|
||||
inline Entry *GetEntry(const RoadVehicle *rv) {
|
||||
DiagDirection diag_dir = DirToDiagDir(rv->direction);
|
||||
return this->GetEntry(rv->overtaking != 0 ? ReverseDiagDir(diag_dir) : diag_dir);
|
||||
}
|
||||
|
||||
void MakeDriveThrough();
|
||||
void ClearDriveThrough();
|
||||
void ChangeDriveThroughDisallowedRoadDirections(DisallowedRoadDirections drd);
|
||||
|
||||
void Leave(RoadVehicle *rv);
|
||||
bool Enter(RoadVehicle *rv);
|
||||
|
Reference in New Issue
Block a user