trackgen: fix pit building detection when pits have pit wall
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@8396 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 801e01a5fbb84b81ff68751665f629caf4b79fa5 Former-commit-id: 034bb0847417cf5c85abdd182f3aef7144bd0f93
This commit is contained in:
parent
59fe11d69d
commit
05f7a3af74
1 changed files with 14 additions and 33 deletions
|
@ -1964,7 +1964,12 @@ int InitScene(tTrack *Track, void *TrackHandle, bool bump, bool raceline, bool b
|
|||
sprintf(sname, "B%dRt", j);
|
||||
for (i = 0, mseg = Track->seg->next; i < Track->nseg; i++, mseg = mseg->next)
|
||||
{
|
||||
if ((mseg->rside != nullptr) && (mseg->rside->raceInfo & TR_PITBUILD))
|
||||
// Find last side segment
|
||||
seg = mseg;
|
||||
while (seg->rside)
|
||||
seg = seg->rside;
|
||||
|
||||
if (seg->raceInfo & TR_PITBUILD)
|
||||
{
|
||||
startNeeded = 1;
|
||||
runninglentgh = 0;
|
||||
|
@ -1977,21 +1982,6 @@ int InitScene(tTrack *Track, void *TrackHandle, bool bump, bool raceline, bool b
|
|||
if (!curTexLink)
|
||||
{
|
||||
texLen = 0; // edited
|
||||
} /*else {
|
||||
;
|
||||
} auch edited */
|
||||
// texLen = curTexSeg / curTexSize;
|
||||
if (mseg->rside)
|
||||
{
|
||||
seg = mseg->rside;
|
||||
if (seg->rside)
|
||||
{
|
||||
seg = seg->rside;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
seg = mseg;
|
||||
}
|
||||
trkpos.seg = seg;
|
||||
if (startNeeded || (runninglentgh > LG_STEP_MAX))
|
||||
|
@ -2300,7 +2290,12 @@ int InitScene(tTrack *Track, void *TrackHandle, bool bump, bool raceline, bool b
|
|||
sprintf(sname, "B%dLt", j);
|
||||
for (i = 0, mseg = Track->seg->next; i < Track->nseg; i++, mseg = mseg->next)
|
||||
{
|
||||
if ((mseg->lside != nullptr) && (mseg->lside->raceInfo & TR_PITBUILD))
|
||||
// Find last side segment
|
||||
seg = mseg;
|
||||
while (seg->lside)
|
||||
seg = seg->lside;
|
||||
|
||||
if (seg->raceInfo & TR_PITBUILD)
|
||||
{
|
||||
runninglentgh = 0;
|
||||
startNeeded = 1;
|
||||
|
@ -2312,23 +2307,9 @@ int InitScene(tTrack *Track, void *TrackHandle, bool bump, bool raceline, bool b
|
|||
CHECKDISPLIST(curBarrier->surface->material, sname, i, 0);
|
||||
if (!curTexLink)
|
||||
{
|
||||
texLen = 0; //*
|
||||
} /*else {
|
||||
curTexSeg = mseg->lgfromstart;
|
||||
}
|
||||
texLen = curTexSeg / curTexSize; */
|
||||
if (mseg->lside)
|
||||
{
|
||||
seg = mseg->lside;
|
||||
if (seg->lside)
|
||||
{
|
||||
seg = seg->lside;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
seg = mseg;
|
||||
texLen = 0;
|
||||
}
|
||||
trkpos.seg = seg;
|
||||
if (startNeeded || (runninglentgh > LG_STEP_MAX))
|
||||
{
|
||||
NEWDISPLIST(0, sname, i);
|
||||
|
|
Loading…
Reference in a new issue