From 40489513864242c433c08cdad162bb978550e7ec Mon Sep 17 00:00:00 2001 From: iobyte Date: Sun, 14 Aug 2022 22:36:19 +0000 Subject: [PATCH] trackgen: fence only has one side git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@8397 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 5316a5b928ff0f238c52919ef0178fa65857b1d9 Former-commit-id: 899824e0740be70900de075aa9e6455b96cfcbbb --- src/tools/trackgen/track.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/tools/trackgen/track.cpp b/src/tools/trackgen/track.cpp index ed8d9cb49..451feffd5 100644 --- a/src/tools/trackgen/track.cpp +++ b/src/tools/trackgen/track.cpp @@ -1978,6 +1978,11 @@ int InitScene(tTrack *Track, void *TrackHandle, bool bump, bool raceline, bool b else { curBarrier = mseg->barrier[0]; + + // fence only has one side (j = 0) + if (curBarrier->style == TR_FENCE && j != 0) + continue; + CHECKDISPLIST(curBarrier->surface->material, sname, i, 0); if (!curTexLink) { @@ -2304,6 +2309,11 @@ int InitScene(tTrack *Track, void *TrackHandle, bool bump, bool raceline, bool b else { curBarrier = mseg->barrier[1]; + + // fence only has one side (j = 0) + if (curBarrier->style == TR_FENCE && j != 0) + continue; + CHECKDISPLIST(curBarrier->surface->material, sname, i, 0); if (!curTexLink) {