- added simplix_mp1

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@7265 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: d2de2819a10fa96800f1e631d37208e54edc668d
Former-commit-id: 7357c61760f59e635c908fa8e974766a80606c73
This commit is contained in:
torcs-ng 2021-02-09 13:05:13 +00:00
parent 0860eee8ad
commit 0469457772
4 changed files with 30 additions and 6 deletions

View file

@ -74,7 +74,7 @@ SET(ROBOT_SOURCES
# Official-only simplix instances.
SET(ROBOT_CLONES simplix_36GP simplix_67GP simplix_sc simplix_srw simplix_stock simplix_trb1 simplix_ls1 simplix_ls2 simplix_mp5
simplix_mpa1 simplix_mpa11 simplix_mpa12 simplix_lp1 simplix_ref)
simplix_mpa1 simplix_mpa11 simplix_mpa12 simplix_lp1 simplix_ref simplix_mp1)
# The ubiquitous robot module and its clones.
ROBOT_MODULE(NAME ${ROBOT_NAME} VERSION 3.3.0 SOVERSION 1.0.0

View file

@ -2957,7 +2957,7 @@ void TDriver::InitAdaptiveShiftLevels()
for (I = 0; I < MAX_GEARS; I++)
{
oShift[I] = 2000.0;
oShift[I] = 1000.0;
if (TDriver::UseGPBrakeLimit)
oGearEff[I] = 0.95;
else
@ -4975,10 +4975,10 @@ double TDriver::CalcFriction_simplix_REF(const double Crv)
//--------------------------------------------------------------------------*
void TDriver::CalcSkilling_simplix()
{
oSkillScale = oSkillScale / 50.0;
oSkillDriver = oSkillDriver / ((50.0 - oSkillGlobal) / 40.0);
oSkill = oSkillScale * (oSkillGlobal + oSkillDriver * 2)
* (1.0 + oSkillDriver) + oSkillOffset;
oSkillScale = oSkillScale / 50.0;
oSkillDriver = oSkillDriver / ((50.0 - oSkillGlobal) / 40.0);
oSkill = oSkillScale * (oSkillGlobal + oSkillDriver * 2)
* (1.0 + oSkillDriver) + oSkillOffset;
/*
oSkillScale = oSkillScale/50.0;
oSkillDriver = oSkillDriver / (5.0 * ((50.0 - oSkillGlobal)/40.0));

View file

@ -113,6 +113,7 @@ extern GfLogger* PLogSimplix;
#define RTYPE_SIMPLIX_MPA12 12 // Robot type simplix_mpa12
#define RTYPE_SIMPLIX_STOCK 13 // Robot type simplix_stock
#define RTYPE_SIMPLIX_67GP 14
#define RTYPE_SIMPLIX_MP1 15 // Robot type simplix_mp1
//==========================================================================*
//==========================================================================*

View file

@ -303,6 +303,16 @@ void SetUpSimplix()
};
//==========================================================================*
//==========================================================================*
// Schismatic entry point for simplix_mpa1
//--------------------------------------------------------------------------*
void SetUpSimplix_mp1()
{
cRobotType = RTYPE_SIMPLIX_MP1;
SetParameters(NBBOTS, "mp1-cavallo-f2005");
TDriver::SkillingFactor = 0.1f; // Skilling factor for career-mode
};
//==========================================================================*
//==========================================================================*
// Schismatic entry point for simplix_mpa1
//--------------------------------------------------------------------------*
@ -611,6 +621,8 @@ int moduleWelcomeV1_00
SetUpSimplix_36GP();
else if (strncmp(RobName,"simplix_67GP",strlen("simplix_67GP")) == 0)
SetUpSimplix_67GP();
else if (strncmp(RobName,"simplix_mp1",strlen("simplix_mp1")) == 0)
SetUpSimplix_mp1();
else if (strncmp(RobName,"simplix_mpa1",strlen("simplix_mpa1")) == 0)
SetUpSimplix_mpa1();
else if (strncmp(RobName,"simplix_mpa11",strlen("simplix_mpa11")) == 0)
@ -880,6 +892,17 @@ static int InitFuncPt(int Index, void *Pt)
cInstances[Index-IndexOffset].cRobot->SideBorderOuter(0.30f);
cInstances[Index-IndexOffset].cRobot->SideBorderInner(0.00f);
}
else if (cRobotType == RTYPE_SIMPLIX_MP1)
{
LogSimplix.debug("#cRobotType == RTYPE_SIMPLIX_MP1\n");
cInstances[Index-IndexOffset].cRobot->CalcSkillingFoo = &TDriver::CalcSkilling_simplix;
cInstances[Index-IndexOffset].cRobot->CalcFrictionFoo = &TDriver::CalcFriction_simplix_Identity;
cInstances[Index-IndexOffset].cRobot->CalcCrvFoo = &TDriver::CalcCrv_simplix_Identity;
cInstances[Index-IndexOffset].cRobot->CalcHairpinFoo = &TDriver::CalcHairpin_simplix_Identity;
cInstances[Index-IndexOffset].cRobot->ScaleSide(0.95f,0.95f);
cInstances[Index-IndexOffset].cRobot->SideBorderOuter(0.30f);
cInstances[Index-IndexOffset].cRobot->SideBorderInner(0.00f);
}
else if (cRobotType == RTYPE_SIMPLIX_36GP)
{
LogSimplix.debug("#cRobotType == RTYPE_SIMPLIX_36GP\n");