diff options
Diffstat (limited to 'src/engine/octaedit.cpp')
| -rw-r--r-- | src/engine/octaedit.cpp | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/engine/octaedit.cpp b/src/engine/octaedit.cpp index 5baa6f0..3092221 100644 --- a/src/engine/octaedit.cpp +++ b/src/engine/octaedit.cpp @@ -4,7 +4,7 @@ extern int outline; bool boxoutline = false; -void boxs(int orient, vec o, const vec &s, float size) +void boxs(int orient, vec o, const vec &s, float size) { int d = dimension(orient), dc = dimcoord(orient); float f = boxoutline ? (dc>0 ? 0.2f : -0.2f) : 0; @@ -291,7 +291,7 @@ void countselchild(cube *c, const ivec &cor, int size) { ivec o(i, cor, size); if(c[i].children) countselchild(c[i].children, o, size/2); - else + else { selchildcount++; if(c[i].material != MAT_AIR && selchildmat != MAT_AIR) @@ -488,7 +488,7 @@ void rendereditcursor() selchildcount = 0; selchildmat = -1; countselchild(worldroot, ivec(0, 0, 0), worldsize/2); - if(mag>=1 && selchildcount==1) + if(mag>=1 && selchildcount==1) { selchildmat = c->material; if(mag>1) selchildcount = -mag; @@ -604,7 +604,6 @@ void commitchanges(bool force) setupmaterials(oldlen); invalidatepostfx(); updatevabbs(); - resetblobs(); } void changed(const block3 &sel, bool commit = true) @@ -981,7 +980,7 @@ static bool unpackblock(block3 *&b, B &buf) } struct vslotmap -{ +{ int index; VSlot *vslot; @@ -1362,7 +1361,7 @@ static void genprefabmesh(prefabmesh &r, cube &c, const ivec &co, int size) } else if(!isempty(c)) { - int vis; + int vis; loopi(6) if((vis = visibletris(c, i, co, size))) { ivec v[4]; @@ -2619,8 +2618,8 @@ void rotatecube(cube &c, int d) // rotates cube clockwise. see pics in cvs for void mpflip(selinfo &sel, bool local) { - if(local) - { + if(local) + { game::edittrigger(sel, EDIT_FLIP); makeundo(); } @@ -2676,8 +2675,8 @@ COMMAND(flip, ""); COMMAND(rotate, "i"); enum { EDITMATF_EMPTY = 0x10000, EDITMATF_NOTEMPTY = 0x20000, EDITMATF_SOLID = 0x30000, EDITMATF_NOTSOLID = 0x40000 }; -static const struct { const char *name; int filter; } editmatfilters[] = -{ +static const struct { const char *name; int filter; } editmatfilters[] = +{ { "empty", EDITMATF_EMPTY }, { "notempty", EDITMATF_NOTEMPTY }, { "solid", EDITMATF_SOLID }, @@ -2744,8 +2743,8 @@ void editmat(char *name, char *filtername) if(filter < 0) filter = findmaterial(filtername); if(filter < 0) { - conoutf(CON_ERROR, "unknown material \"%s\"", filtername); - return; + conoutf(CON_ERROR, "unknown material \"%s\"", filtername); + return; } } int id = -1; |
