Add: NewGRF road stops

This commit is contained in:
Jonathan G Rennison
2022-11-06 15:01:27 +00:00
committed by rubidium42
parent a18182e24b
commit 4c1406a4b5
33 changed files with 2086 additions and 132 deletions

View File

@@ -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();
}