mirror of
https://github.com/ZDoom/zdbsp.git
synced 2024-11-23 20:32:14 +00:00
- Fixed: ZDBSP wrote uninitialized data for normal segs.
SVN r2630 (trunk)
This commit is contained in:
parent
c563e67a21
commit
9c389f90c8
3 changed files with 12 additions and 10 deletions
|
@ -203,10 +203,12 @@ void FNodeBuilder::CreateSubsectorsForReal ()
|
|||
}
|
||||
for (unsigned int i = sub.firstline; i < SegList.Size(); ++i)
|
||||
{
|
||||
D(printf (" Seg %5d%c(%5d,%5d)-(%5d,%5d)\n", SegList[i].SegPtr - &Segs[0],
|
||||
D(printf (" Seg %5d%c%d(%5d,%5d)-%d(%5d,%5d)\n", SegList[i].SegPtr - &Segs[0],
|
||||
SegList[i].SegPtr->linedef == -1 ? '+' : ' ',
|
||||
SegList[i].SegPtr->v1,
|
||||
Vertices[SegList[i].SegPtr->v1].x>>16,
|
||||
Vertices[SegList[i].SegPtr->v1].y>>16,
|
||||
SegList[i].SegPtr->v2,
|
||||
Vertices[SegList[i].SegPtr->v2].x>>16,
|
||||
Vertices[SegList[i].SegPtr->v2].y>>16));
|
||||
SegList[i].SegNum = DWORD(SegList[i].SegPtr - &Segs[0]);
|
||||
|
|
|
@ -114,7 +114,7 @@ extern "C" int ClassifyLineSSE2 (node_t &node, const FSimpleVert *v1, const FSim
|
|||
}
|
||||
else
|
||||
{
|
||||
nears = 2 | ((_.ni[2] | _.pi[2]) ? 0 : 1);
|
||||
nears = 2 | (((_.ni[2] | _.pi[2]) & 1) ^ 1);
|
||||
}
|
||||
|
||||
__m128d zero = _mm_setzero_pd();
|
||||
|
@ -133,11 +133,11 @@ extern "C" int ClassifyLineSSE2 (node_t &node, const FSimpleVert *v1, const FSim
|
|||
__m128d epsilon = _mm_set1_pd(SIDE_EPSILON);
|
||||
__m128d close = _mm_cmplt_pd(dist, epsilon);
|
||||
_mm_storeu_pd(_.n, close);
|
||||
if ((nears & 2) && _.ni[0])
|
||||
if (nears & _.ni[0] & 2)
|
||||
{
|
||||
sv1 = 0;
|
||||
}
|
||||
if ((nears & 1) && _.ni[2])
|
||||
if (nears & _.ni[2] & 1)
|
||||
{
|
||||
sv2 = 0;
|
||||
}
|
||||
|
|
|
@ -1041,12 +1041,12 @@ void FProcessor::WriteSegs (FWadWriter &out)
|
|||
|
||||
for (i = 0; i < Level.NumSegs; ++i)
|
||||
{
|
||||
segdata[i].v1 = LittleShort(segdata[i].v1);
|
||||
segdata[i].v2 = LittleShort(segdata[i].v2);
|
||||
segdata[i].angle = LittleShort(segdata[i].angle);
|
||||
segdata[i].linedef = LittleShort(segdata[i].linedef);
|
||||
segdata[i].side = LittleShort(segdata[i].side);
|
||||
segdata[i].offset = LittleShort(segdata[i].offset);
|
||||
segdata[i].v1 = LittleShort(WORD(Level.Segs[i].v1));
|
||||
segdata[i].v2 = LittleShort(WORD(Level.Segs[i].v2));
|
||||
segdata[i].angle = LittleShort(Level.Segs[i].angle);
|
||||
segdata[i].linedef = LittleShort(Level.Segs[i].linedef);
|
||||
segdata[i].side = LittleShort(Level.Segs[i].side);
|
||||
segdata[i].offset = LittleShort(Level.Segs[i].offset);
|
||||
}
|
||||
out.WriteLump ("SEGS", segdata, sizeof(*segdata)*Level.NumSegs);
|
||||
|
||||
|
|
Loading…
Reference in a new issue