forked from speed-dreams/speed-dreams-code
Update simplix_sc variable slowdown parameter
Limit side use git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@5540 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 44dec8f3a30be57b5b470caebac54663cd5e1e91 Former-commit-id: 967218f7072e48049a739affef83dcb3eab54e13
This commit is contained in:
parent
794d234aa5
commit
41700a775f
5 changed files with 27 additions and 17 deletions
|
@ -9,10 +9,10 @@
|
||||||
//
|
//
|
||||||
// File : unitdriver.cpp
|
// File : unitdriver.cpp
|
||||||
// Created : 2007.11.25
|
// Created : 2007.11.25
|
||||||
// Last changed : 2013.06.13
|
// Last changed : 2013.06.25
|
||||||
// Copyright : © 2007-2013 Wolf-Dieter Beelitz
|
// Copyright : © 2007-2013 Wolf-Dieter Beelitz
|
||||||
// eMail : wdb@wdbee.de
|
// eMail : wdb@wdbee.de
|
||||||
// Version : 4.00.001
|
// Version : 4.00.002
|
||||||
//--------------------------------------------------------------------------*
|
//--------------------------------------------------------------------------*
|
||||||
//
|
//
|
||||||
// Copyright: (C) 2000 by Eric Espie
|
// Copyright: (C) 2000 by Eric Espie
|
||||||
|
@ -314,6 +314,7 @@ TDriver::TDriver(int Index):
|
||||||
oSideReduction(1.0),
|
oSideReduction(1.0),
|
||||||
oLastSideReduction(1.0),
|
oLastSideReduction(1.0),
|
||||||
oMinDistLong(FLT_MAX),
|
oMinDistLong(FLT_MAX),
|
||||||
|
oSlowRadius(1.0),
|
||||||
|
|
||||||
NBRRL(0),
|
NBRRL(0),
|
||||||
oRL_FREE(0),
|
oRL_FREE(0),
|
||||||
|
@ -565,7 +566,7 @@ void TDriver::AdjustDriving(
|
||||||
|
|
||||||
Param.oCarParam.oLimitSideUse =
|
Param.oCarParam.oLimitSideUse =
|
||||||
GfParmGetNum(Handle,TDriver::SECT_PRIV,PRV_LIMIT_SIDE_USE,NULL,
|
GfParmGetNum(Handle,TDriver::SECT_PRIV,PRV_LIMIT_SIDE_USE,NULL,
|
||||||
(float) 0) > 0;
|
(float) 1) > 0;
|
||||||
if (Param.oCarParam.oLimitSideUse)
|
if (Param.oCarParam.oLimitSideUse)
|
||||||
LogSimplix.debug("#Limit side use: true\n");
|
LogSimplix.debug("#Limit side use: true\n");
|
||||||
else
|
else
|
||||||
|
@ -581,6 +582,11 @@ void TDriver::AdjustDriving(
|
||||||
-1.0);
|
-1.0);
|
||||||
LogSimplix.debug("#Ugly CrvZ: %g\n",Param.oCarParam.oUglyCrvZ);
|
LogSimplix.debug("#Ugly CrvZ: %g\n",Param.oCarParam.oUglyCrvZ);
|
||||||
|
|
||||||
|
oSlowRadius =
|
||||||
|
GfParmGetNum(Handle,TDriver::SECT_PRIV,PRV_SLOW_RADIUS,NULL,
|
||||||
|
oSlowRadius);
|
||||||
|
LogSimplix.debug("#Slow Radius: %g\n",oSlowRadius);
|
||||||
|
|
||||||
Param.oCarParam.oScaleMu = ScaleMu *
|
Param.oCarParam.oScaleMu = ScaleMu *
|
||||||
GfParmGetNum(Handle,TDriver::SECT_PRIV,PRV_SCALE_MU,NULL,
|
GfParmGetNum(Handle,TDriver::SECT_PRIV,PRV_SCALE_MU,NULL,
|
||||||
(float) Param.oCarParam.oScaleMu);
|
(float) Param.oCarParam.oScaleMu);
|
||||||
|
@ -4039,7 +4045,7 @@ double TDriver::CalcCrv_simplix_Identity(double Crv)
|
||||||
//--------------------------------------------------------------------------*
|
//--------------------------------------------------------------------------*
|
||||||
double TDriver::CalcCrv_simplix_SC(double Crv)
|
double TDriver::CalcCrv_simplix_SC(double Crv)
|
||||||
{
|
{
|
||||||
if (fabs(Crv) > 1/50.0)
|
if (fabs(Crv) > 1/oSlowRadius)
|
||||||
return 1.5; // Filter narrow turns
|
return 1.5; // Filter narrow turns
|
||||||
else
|
else
|
||||||
return 1.0;
|
return 1.0;
|
||||||
|
|
|
@ -9,10 +9,10 @@
|
||||||
//
|
//
|
||||||
// File : unitdriver.h
|
// File : unitdriver.h
|
||||||
// Created : 2007.11.25
|
// Created : 2007.11.25
|
||||||
// Last changed : 2013.03.03
|
// Last changed : 2013.06.25
|
||||||
// Copyright : © 2007-2013 Wolf-Dieter Beelitz
|
// Copyright : © 2007-2013 Wolf-Dieter Beelitz
|
||||||
// eMail : wdb@wdbee.de
|
// eMail : wdb@wdbee.de
|
||||||
// Version : 4.00.000
|
// Version : 4.00.002
|
||||||
//--------------------------------------------------------------------------*
|
//--------------------------------------------------------------------------*
|
||||||
// Teile dieser Unit basieren auf diversen Header-Dateien von TORCS
|
// Teile dieser Unit basieren auf diversen Header-Dateien von TORCS
|
||||||
//
|
//
|
||||||
|
@ -357,6 +357,7 @@ private:
|
||||||
float oLastSideReduction;
|
float oLastSideReduction;
|
||||||
|
|
||||||
double oMinDistLong;
|
double oMinDistLong;
|
||||||
|
float oSlowRadius;
|
||||||
|
|
||||||
int NBRRL;
|
int NBRRL;
|
||||||
int oRL_FREE;
|
int oRL_FREE;
|
||||||
|
|
|
@ -9,10 +9,10 @@
|
||||||
//
|
//
|
||||||
// File : unitglobal.h
|
// File : unitglobal.h
|
||||||
// Created : 2007.11.17
|
// Created : 2007.11.17
|
||||||
// Last changed : 2013.06.23
|
// Last changed : 2013.06.25
|
||||||
// Copyright : © 2007-2013 Wolf-Dieter Beelitz
|
// Copyright : © 2007-2013 Wolf-Dieter Beelitz
|
||||||
// eMail : wdb@wdbee.de
|
// eMail : wdb@wdbee.de
|
||||||
// Version : 4.00.001
|
// Version : 4.00.002
|
||||||
//--------------------------------------------------------------------------*
|
//--------------------------------------------------------------------------*
|
||||||
// This program was developed and tested on windows XP
|
// This program was developed and tested on windows XP
|
||||||
// There are no known Bugs, but:
|
// There are no known Bugs, but:
|
||||||
|
@ -467,6 +467,7 @@ enum
|
||||||
#define PRV_SCALE_STEER "scale steer"
|
#define PRV_SCALE_STEER "scale steer"
|
||||||
|
|
||||||
#define PRV_UGLY_CRVZ "ugly crvz" // Use stiff crv
|
#define PRV_UGLY_CRVZ "ugly crvz" // Use stiff crv
|
||||||
|
#define PRV_SLOW_RADIUS "slow radius" // Radius to start slow down
|
||||||
|
|
||||||
#define PRV_SIDE_MU "side mu" // Scale friction calculation for sides
|
#define PRV_SIDE_MU "side mu" // Scale friction calculation for sides
|
||||||
#define PRV_RAIN_MU "scale mu rain" // Scale friction calculation for sides
|
#define PRV_RAIN_MU "scale mu rain" // Scale friction calculation for sides
|
||||||
|
|
|
@ -7,14 +7,16 @@
|
||||||
//
|
//
|
||||||
// File : unitmain.cpp
|
// File : unitmain.cpp
|
||||||
// Created : 2008.01.27
|
// Created : 2008.01.27
|
||||||
// Last changed : 2013.06.23
|
// Last changed : 2013.06.25
|
||||||
// Copyright : © 2007-2013 Wolf-Dieter Beelitz
|
// Copyright : © 2007-2013 Wolf-Dieter Beelitz
|
||||||
// eMail : wdb@wdbee.de
|
// eMail : wdb@wdbee.de
|
||||||
// Version : 4.00.01
|
// Version : 4.00.02
|
||||||
//--------------------------------------------------------------------------*
|
//--------------------------------------------------------------------------*
|
||||||
// V4.00.001:
|
// V4.00.002:
|
||||||
// Modifications for Supercars
|
// Modifications for Supercars
|
||||||
// Slow down at narrow turns more than normal (Needed for Aalborg)
|
// Slow down at narrow turns more than normal (Needed for Aalborg)
|
||||||
|
// Individual parameter SlowRadius
|
||||||
|
// Limit side use to inner side to halve of outer side
|
||||||
//--------------------------------------------------------------------------*
|
//--------------------------------------------------------------------------*
|
||||||
// V4.00.000 (SimuV4)(Single Wheel Braking, Air Brake):
|
// V4.00.000 (SimuV4)(Single Wheel Braking, Air Brake):
|
||||||
// New Logging used
|
// New Logging used
|
||||||
|
|
|
@ -10,10 +10,10 @@
|
||||||
//
|
//
|
||||||
// File : unittrack.cpp
|
// File : unittrack.cpp
|
||||||
// Created : 2007.11.17
|
// Created : 2007.11.17
|
||||||
// Last changed : 2013.03.02
|
// Last changed : 2013.06.25
|
||||||
// Copyright : © 2007-2011 Wolf-Dieter Beelitz
|
// Copyright : © 2007-2011 Wolf-Dieter Beelitz
|
||||||
// eMail : wdb@wdbee.de
|
// eMail : wdb@wdbee.de
|
||||||
// Version : 4.00.000
|
// Version : 4.00.002
|
||||||
//--------------------------------------------------------------------------*
|
//--------------------------------------------------------------------------*
|
||||||
// Stellt Funktionen zur Streckenbeschreibung zur Verfügung
|
// Stellt Funktionen zur Streckenbeschreibung zur Verfügung
|
||||||
//--------------------------------------------------------------------------*
|
//--------------------------------------------------------------------------*
|
||||||
|
@ -601,9 +601,9 @@ void TTrackDescription::InitTrack
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
WCurb = MIN(WCurb,CarParam.oLimitSideWidth);
|
WCurb = MIN(WCurb,CarParam.oLimitSideWidth/2);
|
||||||
W = MIN(W,CarParam.oLimitSideWidth);
|
W = MIN(W,CarParam.oLimitSideWidth);
|
||||||
ExtraW = MIN(ExtraW,CarParam.oLimitSideWidth);
|
ExtraW = MIN(ExtraW,CarParam.oLimitSideWidth/2);
|
||||||
}
|
}
|
||||||
Done = true;
|
Done = true;
|
||||||
}
|
}
|
||||||
|
@ -618,9 +618,9 @@ void TTrackDescription::InitTrack
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
WCurb = MIN(WCurb,CarParam.oLimitSideWidth);
|
WCurb = MIN(WCurb,CarParam.oLimitSideWidth/2);
|
||||||
W = MIN(W,CarParam.oLimitSideWidth);
|
W = MIN(W,CarParam.oLimitSideWidth);
|
||||||
ExtraW = MIN(ExtraW,CarParam.oLimitSideWidth);
|
ExtraW = MIN(ExtraW,CarParam.oLimitSideWidth/2);
|
||||||
}
|
}
|
||||||
Done = true;
|
Done = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue