From ee42a801883b29b1cef7c59f46ed7811e9ba6ad3 Mon Sep 17 00:00:00 2001 From: jerrrrycho Date: Mon, 9 Nov 2026 16:12:44 +0100 Subject: [PATCH] docs: the odometer store is keyed by the vehicle's name in the scenario --- vehicle/odometer.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vehicle/odometer.h b/vehicle/odometer.h index 083d00d1a..84e18b1f1 100644 --- a/vehicle/odometer.h +++ b/vehicle/odometer.h @@ -47,7 +47,11 @@ struct reading { bool moved() const; }; -// the saved odometer states of the vehicles, km by vehicle name +// the saved odometer states of the vehicles, km by vehicle name. the name is the one the scenario gives the vehicle +// (the name of its node, TDynamicObject::name(), e.g. EU07-424), the only identity a vehicle has between the sessions: +// the vehicles of the same name in any scenarios share one state, whatever their type, and a vehicle the scenario +// names otherwise starts over, from the legacy or a made up state. the sceneries name the real vehicles by their +// numbers, so it's the same vehicle as a rule class store { public: // reads the states written by write(). lines " ", "~ " for a state counted