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:
iobyte 2023-07-09 22:01:02 +00:00
parent 439f0565d5
commit 02b16dbaa0
2 changed files with 2 additions and 12 deletions

View file

@ -98,7 +98,7 @@ public:
//! Constructor. //! Constructor.
Application::Application() Application::Application()
: GfApplication("TrackGen", "1.6.0.28", "Terrain generator for tracks") : GfApplication("TrackGen", "1.6.0.29", "Terrain generator for tracks")
, HeightSteps(30) , HeightSteps(30)
, Bump(false) , Bump(false)
, Raceline(false) , Raceline(false)

View file

@ -501,16 +501,6 @@ GenerateObjects(tTrack *track, void *TrackHandle, void *CfgHandle, Ac3d &allAc3d
if (GfParmGetEltNb(TrackHandle, TRK_SECT_TERRAIN_OBJECTS) != 0) 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); GfParmListSeekFirst(TrackHandle, TRK_SECT_TERRAIN_OBJECTS);
Ac3d ObjectsRoot; 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); 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); 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)); } while (!GfParmListSeekNext(TrackHandle, TRK_SECT_TERRAIN_OBJECTS));
Ac3d GroupRoot; Ac3d GroupRoot;