//==========================================================================* // Start entry procedure to pit? //--------------------------------------------------------------------------* bool TSimpleStrategy::StartPitEntry(float& Ratio) { float DLong, DLat; // Dist to Pit RtDistToPit(oCar,oTrack,&DLong,&DLat); if (GoToPit() && (DLong < oDistToSwitch)) { Ratio = (float) (1.0 - MAX(0.0,(DLong-100)/oDistToSwitch)); return true; } else return false; };
//==========================================================================* // Start entry procedure to pit? //--------------------------------------------------------------------------* bool TBaseStrategy::StartPitEntry(float& Ratio) { float DLong, DLat; // Dist to Pit RtDistToPit(oCar,oTrack,&DLong,&DLat); // if (GoToPit() && (DLong < oPit->oPitLane->PitDist())) if (GoToPit()) { // Ratio = (float) (1.0 - MAX(0.0,(DLong-100)/oPit->oPitLane->PitDist())); Ratio = 1.0f; return true; } else return false; };