mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-19 03:49:19 +02:00
fix(sonar): test the bearing damage bit, not bit 0 (cpp:S872)
'DamageFlag & dtrain_bearing > 0' parsed as 'DamageFlag & (dtrain_bearing > 0)', i.e. DamageFlag & 1, so bearing friction reacted to the wrong damage flag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -4863,7 +4863,7 @@ void TMoverParameters::ComputeConstans(void)
|
||||
double Curvature; // Ra 2014-07: odwrotność promienia
|
||||
|
||||
TotalMassxg = TotalMass * g; // TotalMass*g
|
||||
BearingF = DamageFlag & dtrain_bearing > 0 ? 2.0 : 0;
|
||||
BearingF = (DamageFlag & dtrain_bearing) != 0 ? 2.0 : 0;
|
||||
|
||||
HideModifier = 0; // int(Couplers[0].CouplingFlag>0)+int(Couplers[1].CouplingFlag>0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user