mirror of
https://github.com/ZDoom/zdbsp.git
synced 2024-11-22 03:41:29 +00:00
- Fixed: ZDBSP wrote broken VERTEXES lumps.
SVN r1484 (trunk)
This commit is contained in:
parent
034d7ab10a
commit
a7fc2fc96c
1 changed files with 7 additions and 7 deletions
|
@ -936,21 +936,21 @@ MapSegGLEx *FProcessor::SegGLsToEx (const MapSegGL *segs, int count)
|
|||
void FProcessor::WriteVertices (FWadWriter &out, int count)
|
||||
{
|
||||
int i;
|
||||
fixed_t *vertdata = (fixed_t *)Level.Vertices;
|
||||
WideVertex *vertdata = Level.Vertices;
|
||||
|
||||
count *= 2;
|
||||
short *verts = new short[count];
|
||||
short *verts = new short[count * 2];
|
||||
|
||||
for (i = 0; i < count; ++i)
|
||||
{
|
||||
verts[i] = LittleShort(vertdata[i] >> FRACBITS);
|
||||
verts[i*2] = LittleShort(vertdata[i].x >> FRACBITS);
|
||||
verts[i*2+1] = LittleShort(vertdata[i].y >> FRACBITS);
|
||||
}
|
||||
out.WriteLump ("VERTEXES", verts, sizeof(*verts)*count);
|
||||
out.WriteLump ("VERTEXES", verts, sizeof(*verts)*count*2);
|
||||
delete[] verts;
|
||||
|
||||
if (count >= 65536)
|
||||
if (count >= 32768)
|
||||
{
|
||||
printf (" VERTEXES is past the normal limit. (%d vertices)\n", count/2);
|
||||
printf (" VERTEXES is past the normal limit. (%d vertices)\n", count);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue