18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-02 20:05:23 +01:00

refactor(vehicle): the helpers of the split files out of the global namespace

The split of Driver.cpp, DynObj.cpp and Train.cpp took five helpers out
of their anonymous namespaces. outside() is used in offtrack.cpp alone
and goes back into its anonymous namespace. The four shared by the parts
of a class go into a namespace of its module: vehicle_ai
(brake_response_horizon, uphill_stopping_distance), vehicle_dynamic
(seconds_since) and vehicle_cab (is_hold_coil_lever).

The rename of mover to physics also hit comments where the word meant
something else: "prime mover" and "move the master controller" are back.
This commit is contained in:
2026-11-29 08:36:30 +01:00
parent dc7bd0efe6
commit 12c5bb35e7
15 changed files with 45 additions and 31 deletions
+1 -1
View File
@@ -1694,7 +1694,7 @@ void physics::Vehicle::LoadFIZ_PowerParamsDecode(TPowerParameters &Powerparamete
}
case TPowerSource::Generator:
{
// prime physics for the generator
// prime mover for the generator
auto &generatorparameters{Powerparameters.EngineGenerator};
if (auto const enginetype{LoadFIZ_EngineDecode(extract_value(Prefix + "GeneratorEngine", Line))}; enginetype == TEngineType::Main)
+2 -2
View File
@@ -212,8 +212,8 @@ enum class TPowerSource
struct engine_generator
{
// ld inputs
/// <summary>Pointer to the prime-physics revolutions [rev/s].</summary>
double *engine_revolutions; // revs per second of the prime physics
/// <summary>Pointer to the prime-mover revolutions [rev/s].</summary>
double *engine_revolutions; // revs per second of the prime mover
// config
/// <summary>Minimum working rev rate [rev/s].</summary>
double revolutions_min; // min working revolutions rate, in revs per second