1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-31 02:19:09 +00:00

Fix: [NewGRF] Roadstop animation/randomisation was not triggered on vehicle arrival. (#14003)

This commit is contained in:
frosch
2025-04-15 14:53:29 +02:00
committed by GitHub
parent 5fad689782
commit 301b209b87

View File

@@ -37,6 +37,7 @@
#include "framerate_type.h"
#include "roadveh_cmd.h"
#include "road_cmd.h"
#include "newgrf_roadstop.h"
#include "table/strings.h"
@@ -1453,6 +1454,8 @@ again:
v->last_station_visited = st->index;
RoadVehArrivesAt(v, st);
v->BeginLoading();
TriggerRoadStopRandomisation(st, v->tile, RSRT_VEH_ARRIVES);
TriggerRoadStopAnimation(st, v->tile, SAT_TRAIN_ARRIVES);
}
return false;
}
@@ -1515,6 +1518,8 @@ again:
if (IsDriveThroughStopTile(v->tile) || (v->current_order.IsType(OT_GOTO_STATION) && v->current_order.GetDestination() == st->index)) {
RoadVehArrivesAt(v, st);
v->BeginLoading();
TriggerRoadStopRandomisation(st, v->tile, RSRT_VEH_ARRIVES);
TriggerRoadStopAnimation(st, v->tile, SAT_TRAIN_ARRIVES);
return false;
}
} else {