diff -r 7b5afec27688 -r a21e49914264 src/gldraw.cpp --- a/src/gldraw.cpp Thu Jun 13 01:13:06 2013 +0300 +++ b/src/gldraw.cpp Thu Jun 13 02:55:47 2013 +0300 @@ -701,10 +701,10 @@ if (g_glInvert == false) for (short i = 0; i < numverts; ++i) - compileVertex (obj->coords[i]); + compileVertex (obj->m_coords[i]); else for (short i = numverts - 1; i >= 0; --i) - compileVertex (obj->coords[i]); + compileVertex (obj->m_coords[i]); glEnd (); } @@ -1239,7 +1239,9 @@ // Copy the vertices from m_rectverts updateRectVerts (); - memcpy (quad->coords, m_rectverts, sizeof quad->coords); + + for (int i = 0; i < quad->vertices (); ++i) + quad->setVertex (i, m_rectverts[i]); quad->setColor (maincolor); obj = quad; @@ -1254,10 +1256,8 @@ case 2: // 2 verts - make a line - obj = new LDLine; + obj = new LDLine (verts[0], verts[1]); obj->setColor (edgecolor); - for (ushort i = 0; i < 2; ++i) - obj->coords[i] = verts[i]; break; case 3: @@ -1268,7 +1268,7 @@ obj->setColor (maincolor); for (ushort i = 0; i < obj->vertices (); ++i) - obj->coords[i] = verts[i]; + obj->setVertex (i, verts[i]); break; } } @@ -1290,7 +1290,7 @@ if (obj->vertices () >= 2) for (int i = 0; i < obj->vertices (); ++i) - verts << obj->coords[i]; + verts << obj->getVertex (i); else if (obj->getType () == LDObject::Subfile || obj->getType () == LDObject::Radial) { vector objs;