Tracerestrict: Pass vehicle ptr instead of index to Occupy/Vacate

And related functions, to avoid unnecessary vehicle pool lookup
This commit is contained in:
Jonathan G Rennison
2024-01-20 23:20:40 +00:00
parent 876bce431f
commit 461fe116f2
4 changed files with 59 additions and 48 deletions

View File

@@ -266,7 +266,7 @@ public:
}
/* This must be done before calling TraceRestrictExecuteResEndSlot */
temporary_slot_state.ApplyTemporaryChanges(Yapf().GetVehicle()->index);
temporary_slot_state.ApplyTemporaryChanges(Yapf().GetVehicle());
restricted_signal_state.TraceRestrictExecuteResEndSlot(Yapf().GetVehicle());