From b9f39c51fd7dd1d3f21e99d0ad1107394f330034 Mon Sep 17 00:00:00 2001 From: wdbee Date: Sun, 18 Jan 2009 20:56:21 +0000 Subject: [PATCH] Update skilling git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@640 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: e581d9e501800e569a52d7bb0a803d13da3684f2 Former-commit-id: 76e1fd62f08cee4a0191f22ebb794fdfb56de31f --- .../simplix/simplix_sc/sc-f360/default.xml | 2 +- .../simplix/simplix_sc/tracks/aalborg.xml | 4 ++- .../simplix/simplix_sc/tracks/e-track-1.xml | 2 +- .../simplix/simplix_sc/tracks/g-track-2.xml | 4 +-- .../simplix/simplix_sc/tracks/ruudskogen.xml | 2 +- src/drivers/simplix/src/unittrack.cpp | 27 ++++++++++++++----- 6 files changed, 29 insertions(+), 12 deletions(-) diff --git a/src/drivers/simplix/simplix_sc/sc-f360/default.xml b/src/drivers/simplix/simplix_sc/sc-f360/default.xml index b2875c918..26091b6ce 100644 --- a/src/drivers/simplix/simplix_sc/sc-f360/default.xml +++ b/src/drivers/simplix/simplix_sc/sc-f360/default.xml @@ -137,7 +137,7 @@ - + diff --git a/src/drivers/simplix/simplix_sc/tracks/aalborg.xml b/src/drivers/simplix/simplix_sc/tracks/aalborg.xml index c92e3b6eb..1d602b91f 100644 --- a/src/drivers/simplix/simplix_sc/tracks/aalborg.xml +++ b/src/drivers/simplix/simplix_sc/tracks/aalborg.xml @@ -23,7 +23,9 @@ - + + + diff --git a/src/drivers/simplix/simplix_sc/tracks/e-track-1.xml b/src/drivers/simplix/simplix_sc/tracks/e-track-1.xml index d95d06cff..c0fb526e4 100644 --- a/src/drivers/simplix/simplix_sc/tracks/e-track-1.xml +++ b/src/drivers/simplix/simplix_sc/tracks/e-track-1.xml @@ -23,7 +23,7 @@ - + diff --git a/src/drivers/simplix/simplix_sc/tracks/g-track-2.xml b/src/drivers/simplix/simplix_sc/tracks/g-track-2.xml index 46f2030d1..79bac5a4f 100644 --- a/src/drivers/simplix/simplix_sc/tracks/g-track-2.xml +++ b/src/drivers/simplix/simplix_sc/tracks/g-track-2.xml @@ -25,7 +25,7 @@ - - + + diff --git a/src/drivers/simplix/simplix_sc/tracks/ruudskogen.xml b/src/drivers/simplix/simplix_sc/tracks/ruudskogen.xml index 11b4db01b..fc5b7de29 100644 --- a/src/drivers/simplix/simplix_sc/tracks/ruudskogen.xml +++ b/src/drivers/simplix/simplix_sc/tracks/ruudskogen.xml @@ -23,7 +23,7 @@ - + diff --git a/src/drivers/simplix/src/unittrack.cpp b/src/drivers/simplix/src/unittrack.cpp index 8d2ae6777..86ec8c974 100644 --- a/src/drivers/simplix/src/unittrack.cpp +++ b/src/drivers/simplix/src/unittrack.cpp @@ -415,6 +415,8 @@ void TTrackDescription::InitTrack LastSegType = LastSeg->type; // reset Seg = oSections[I].Seg; // Get torcs segment + //if (strncmp(Seg->name,"180",3) == 0) + // GfOut("%s\n",Seg->name); double DistFromStart = // Distance from start oSections[I].DistFromStart; // of section @@ -446,6 +448,7 @@ void TTrackDescription::InitTrack double ExtraW = 0; // Initialize add. width double ExtraWpit = 0; // Initialize add. width bool Done = false; // Reset flag + bool PitOnly = false; // Reset flag while(PSide) // Loop all side-segments { double Wpit = 0.0; // Initialize @@ -476,10 +479,16 @@ void TTrackDescription::InitTrack WCurb = MIN(WCurb, 0.15); // use 15 cm only // Don't go too far up raised curbs - if (slope > 0.15) // If more + if (slope > 0.151) // If more WCurb = 0; // keep off - else if (slope > 0.10) // Use 15 cm + else if (slope > 0.121) // Use 15 cm WCurb = MIN(WCurb, 0.15); // + else if (slope > 0.101) // Use 30 cm + WCurb = MIN(WCurb, 0.30); // + else if (slope > 0.051) // Use 60 cm + WCurb = MIN(WCurb, 0.60); // + else if (slope > 0.021) // Use 120 cm + WCurb = MIN(WCurb, 1.20); // } else if (PSide->style == TR_CURB) // On curbs without height { @@ -550,10 +559,16 @@ void TTrackDescription::InitTrack } ExtraWpit += Wpit; - if (Done) - ExtraW += WCurb; - else - ExtraW += W; + if (!PitOnly) + { + if (Done) + ExtraW += WCurb; + else + ExtraW += W; + + if (Done) + PitOnly = true; + } PSide = PSide->side[S]; }