Add: NewGRF road stops
This commit is contained in:

committed by
rubidium42

parent
a18182e24b
commit
4c1406a4b5
@@ -55,6 +55,7 @@
|
||||
#include "misc_cmd.h"
|
||||
#include "train_cmd.h"
|
||||
#include "vehicle_cmd.h"
|
||||
#include "newgrf_roadstop.h"
|
||||
|
||||
#include "table/strings.h"
|
||||
|
||||
@@ -2303,6 +2304,14 @@ void Vehicle::LeaveStation()
|
||||
|
||||
SetBit(Train::From(this)->flags, VRF_LEAVING_STATION);
|
||||
}
|
||||
if (this->type == VEH_ROAD && !(this->vehstatus & VS_CRASHED)) {
|
||||
/* Trigger road stop animation */
|
||||
if (IsRoadStopTile(this->tile)) {
|
||||
TriggerRoadStopRandomisation(st, this->tile, RSRT_VEH_DEPARTS);
|
||||
TriggerRoadStopAnimation(st, this->tile, SAT_TRAIN_DEPARTS);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
this->MarkDirty();
|
||||
}
|
||||
|
Reference in New Issue
Block a user