Update simplix_36GP pitting

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

Former-commit-id: 8a83edb98573786eff40ed09f3430d239ed10be5
Former-commit-id: 43f8bfeaaf7096bb3386837de14ca20e17c91ecc
This commit is contained in:
wdbee 2009-12-20 22:23:56 +00:00
parent 3c0b715dda
commit b11a7b599d
2 changed files with 25 additions and 17 deletions

View file

@ -656,11 +656,11 @@ void TDriver::InitTrack
// Adjust pitting ... // Adjust pitting ...
Param.Pit.oUseFirstPit = (int) Param.Pit.oUseFirstPit = (int)
GfParmGetNum(Handle,TDriver::SECT_PRIV,PRV_PIT_USE_FIRST,0,1); GfParmGetNum(Handle,TDriver::SECT_PRIV,PRV_PIT_USE_FIRST,0,0);
GfOut("#oUseFirstPit %d\n",Param.Pit.oUseFirstPit); GfOut("#oUseFirstPit %d\n",Param.Pit.oUseFirstPit);
Param.Pit.oUseSmoothPit = (int) Param.Pit.oUseSmoothPit = (int)
GfParmGetNum(Handle,TDriver::SECT_PRIV,PRV_PIT_USE_SMOOTH,0,1); GfParmGetNum(Handle,TDriver::SECT_PRIV,PRV_PIT_USE_SMOOTH,0,0);
GfOut("#oUseSmoothPit %d\n",Param.Pit.oUseSmoothPit); GfOut("#oUseSmoothPit %d\n",Param.Pit.oUseSmoothPit);
Param.Pit.oLaneEntryOffset = Param.Pit.oLaneEntryOffset =
@ -1062,7 +1062,9 @@ void TDriver::Drive()
oTestPitStop = 1; oTestPitStop = 1;
else else
oTestPitStop = 0; oTestPitStop = 0;
if(!Qualification) */
/*
if(!Qualification)
{ {
if (CarLaps > 1) if (CarLaps > 1)
oTestPitStop = 1; oTestPitStop = 1;
@ -3333,7 +3335,7 @@ double TDriver::CalcCrv_simplix_36GP(double Crv)
{ {
double Offset = 1300; double Offset = 1300;
if (oCrvComp) if ((oCrvComp) && (!oGoToPit))
{ {
if (Crv < 0.0085) if (Crv < 0.0085)
return 1.0; return 1.0;

View file

@ -9,7 +9,7 @@
// //
// File : unitpit.cpp // File : unitpit.cpp
// Created : 2007.02.20 // Created : 2007.02.20
// Last changed : 2009.07.12 // Last changed : 2009.12.20
// Copyright : © 2007-2009 Wolf-Dieter Beelitz // Copyright : © 2007-2009 Wolf-Dieter Beelitz
// eMail : wdb@wdbee.de // eMail : wdb@wdbee.de
// Version : 2.00.000 // Version : 2.00.000
@ -521,24 +521,30 @@ void TPitLane::MakePath
if (oPitDist < 0) if (oPitDist < 0)
oPitDist += oTrack->Length(); oPitDist += oTrack->Length();
float Factor = 1.00;
// Set speed to allow to stop // Set speed to allow to stop
float Speed = 4.0; float Speed = 4.0;
if (TDriver::UseBrakeLimit)
{
Factor = 3.00;
Speed = 11.0;
}
oPathPoints[Idx0].MaxSpeed = oPathPoints[Idx0].Speed = Speed; oPathPoints[Idx0].MaxSpeed = oPathPoints[Idx0].Speed = Speed;
Idx1 = (Idx0 + NSEG - 1) % NSEG; Idx1 = (Idx0 + NSEG - 1) % NSEG;
int N = 6; if (!TDriver::UseBrakeLimit)
float Delta = 0.75;
if (TDriver::UseBrakeLimit)
{ {
N = N * 3; int N = 6;
Delta = Delta / 3; float Delta = 0.75;
}
for (I = 0; I < N; I++) for (I = 0; I < N; I++)
{ {
Speed += Delta; Speed += Delta;
oPathPoints[Idx1].MaxSpeed = oPathPoints[Idx1].Speed = Speed; oPathPoints[Idx1].MaxSpeed = oPathPoints[Idx1].Speed = Speed;
Idx1 = (Idx1 + NSEG - 1) % NSEG; Idx1 = (Idx1 + NSEG - 1) % NSEG;
}
} }
// Set speed to restart // Set speed to restart
@ -549,7 +555,7 @@ void TPitLane::MakePath
} }
// Calculate braking // Calculate braking
PropagatePitBreaking(oPitStopPos,Param.oCarParam.oScaleMu); PropagatePitBreaking(oPitStopPos,Factor * Param.oCarParam.oScaleMu);
} }
//==========================================================================* //==========================================================================*