mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-02-12 14:45:27 +00:00
fixed the bogus vector. I wasn't copying enough vertexen when doing the insert.
Oops :/
This commit is contained in:
parent
b19b9141cc
commit
91b2d46330
1 changed files with 3 additions and 2 deletions
|
@ -313,10 +313,11 @@ fixup_center_face (struct box_def *box, int c_face)
|
||||||
} else {
|
} else {
|
||||||
// we have to insert the two cube vertexen into the face poly
|
// we have to insert the two cube vertexen into the face poly
|
||||||
// vertex list
|
// vertex list
|
||||||
int insert = box[ind].leave_vertex + 1;
|
|
||||||
glpoly_t *p = &box[ind].poly;
|
glpoly_t *p = &box[ind].poly;
|
||||||
|
int insert = box[ind].leave_vertex + 1;
|
||||||
|
int count = p->numverts - insert;
|
||||||
const int vert_size = sizeof (p->verts[0]);
|
const int vert_size = sizeof (p->verts[0]);
|
||||||
memmove (p->verts[insert + 2], p->verts[insert], 2 * vert_size);
|
memmove (p->verts[insert + 2], p->verts[insert], count * vert_size);
|
||||||
p->numverts += 2;
|
p->numverts += 2;
|
||||||
set_vertex (box, ind, insert, v[i]);
|
set_vertex (box, ind, insert, v[i]);
|
||||||
set_vertex (box, ind, insert + 1, v[(i - 1) & 3]);
|
set_vertex (box, ind, insert + 1, v[(i - 1) & 3]);
|
||||||
|
|
Loading…
Reference in a new issue