From bfb0b3f07073149cd7a7499a1ee3fe9d82ae7975 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Wed, 15 May 2019 17:42:57 +0200 Subject: [PATCH] quicker editing of 3d models --- mapeditor.cpp | 2 +- polygons.cpp | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/mapeditor.cpp b/mapeditor.cpp index 8de1363f..fcf1f2d0 100644 --- a/mapeditor.cpp +++ b/mapeditor.cpp @@ -1956,7 +1956,7 @@ namespace mapeditor { } if(rebuildPolys) - buildpolys(), rebuildPolys = false; + add_user_shapes(), rebuildPolys = false; } #endif diff --git a/polygons.cpp b/polygons.cpp index 9342b6ae..af07d790 100644 --- a/polygons.cpp +++ b/polygons.cpp @@ -1814,6 +1814,7 @@ hyperpoint turtlevertex(int u, double x, double y, double z) { vector allshapes; void finishshape() { + if(!last) return; last->e = isize(hpc); double area = 0; for(int i=last->s; ie-1; i++) @@ -3189,8 +3190,14 @@ void buildpolys() { #endif bshapeend(); - + extern void add_user_shapes(); prehpc = isize(hpc); + add_user_shapes(); + } + +void add_user_shapes() { + hpc.resize(prehpc); + last = NULL; DEBB(DF_POLY, ("hpc = ", prehpc)); user_triangles_texture.tvertices.clear();