trackgen: fix track object positions
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9092 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 18ae9d2b501f527d3fb1dedf05e0c8bdb5b2f099 Former-commit-id: b1bef7704222de40584141c1494f604a5f38be82
This commit is contained in:
parent
439f0565d5
commit
02b16dbaa0
2 changed files with 2 additions and 12 deletions
|
@ -98,7 +98,7 @@ public:
|
|||
|
||||
//! Constructor.
|
||||
Application::Application()
|
||||
: GfApplication("TrackGen", "1.6.0.28", "Terrain generator for tracks")
|
||||
: GfApplication("TrackGen", "1.6.0.29", "Terrain generator for tracks")
|
||||
, HeightSteps(30)
|
||||
, Bump(false)
|
||||
, Raceline(false)
|
||||
|
|
|
@ -501,16 +501,6 @@ GenerateObjects(tTrack *track, void *TrackHandle, void *CfgHandle, Ac3d &allAc3d
|
|||
|
||||
if (GfParmGetEltNb(TrackHandle, TRK_SECT_TERRAIN_OBJECTS) != 0)
|
||||
{
|
||||
tTrkLocPos trkpos;
|
||||
|
||||
trkpos.type = TR_LPOS_MAIN;
|
||||
trkpos.toStart = 0;
|
||||
trkpos.toRight = 0;
|
||||
trkpos.seg = track->seg->next;
|
||||
tdble zeroX;
|
||||
tdble zeroY;
|
||||
RtTrackLocal2Global(&trkpos, &zeroX, &zeroY, TR_TORIGHT);
|
||||
|
||||
GfParmListSeekFirst(TrackHandle, TRK_SECT_TERRAIN_OBJECTS);
|
||||
|
||||
Ac3d ObjectsRoot;
|
||||
|
@ -524,7 +514,7 @@ GenerateObjects(tTrack *track, void *TrackHandle, void *CfgHandle, Ac3d &allAc3d
|
|||
const unsigned int color = (unsigned int)GfParmGetCurNum(TrackHandle, TRK_SECT_TERRAIN_OBJECTS, TRK_ATT_COLOR, nullptr, 0);
|
||||
|
||||
printf("found color: 0x%X x: %f y: %f\n", color, x, y);
|
||||
AddObject(track, TrackHandle, TerrainRoot, TrackRoot, ObjectsRoot, color, x + zeroX, y + zeroY, multipleMaterials, true);
|
||||
AddObject(track, TrackHandle, TerrainRoot, TrackRoot, ObjectsRoot, color, x + trackOffsetX, y + trackOffsetY, multipleMaterials, true);
|
||||
} while (!GfParmListSeekNext(TrackHandle, TRK_SECT_TERRAIN_OBJECTS));
|
||||
|
||||
Ac3d GroupRoot;
|
||||
|
|
Loading…
Reference in a new issue