mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-18 07:49:19 +02:00
AI allows for small overspeeding while vehicle's speed control is active
This commit is contained in:
committed by
tmj-fstate
parent
0e20ec7f08
commit
a027192f00
@@ -6088,11 +6088,12 @@ TController::UpdateSituation(double dt) {
|
||||
// zmniejszanie predkosci
|
||||
// margines dla prędkości jest doliczany tylko jeśli oczekiwana prędkość jest większa od 5km/h
|
||||
if( false == TestFlag( iDrivigFlags, movePress ) ) {
|
||||
double SpeedCtrlMargin = (mvControlling->SpeedCtrlUnit.IsActive && VelDesired > 5) ? 3 : 0;
|
||||
// jeśli nie dociskanie
|
||||
if( AccDesired < -0.05 ) {
|
||||
ZeroSpeed();
|
||||
}
|
||||
else if( ( vel > VelDesired )
|
||||
else if( ( vel > VelDesired + SpeedCtrlMargin)
|
||||
|| ( fAccGravity < -0.01 ?
|
||||
AccDesired < 0.0 :
|
||||
(AbsAccS > AccDesired && AccDesired < 0.75) ) ) {
|
||||
|
||||
Reference in New Issue
Block a user