From b75d482dc734f24c5ec8b52347c6f9913d36084c Mon Sep 17 00:00:00 2001 From: DignitySAMP Date: Tue, 17 Nov 2026 21:14:23 +0100 Subject: [PATCH] Read the vehicle's time of death before clearing it --- Server/Components/Vehicles/vehicles_impl.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Server/Components/Vehicles/vehicles_impl.hpp b/Server/Components/Vehicles/vehicles_impl.hpp index 0249857ec..1b0003a9c 100644 --- a/Server/Components/Vehicles/vehicles_impl.hpp +++ b/Server/Components/Vehicles/vehicles_impl.hpp @@ -598,8 +598,9 @@ class VehiclesComponent final : public IVehiclesComponent, public CoreEventHandl auto& deathData = vehicle->getDeathData(); if (deathData.time != TimePoint()) { + const TimePoint timeOfDeath = deathData.time; vehicle->setTimeOfDeath(TimePoint()); - vehicle->setLastOccupiedTime(std::max(deathData.time, lastOccupied)); + vehicle->setLastOccupiedTime(std::max(timeOfDeath, lastOccupied)); IPlayer* killer = getPlayers().get(deathData.killerID); if (killer) {