summaryrefslogtreecommitdiff
path: root/src/engine/octaedit.cpp
diff options
context:
space:
mode:
authorxolatile2025-08-10 00:19:46 +0200
committerxolatile2025-08-10 00:19:46 +0200
commit757096e7df15c14b9b10352fa91663483f9e34f8 (patch)
treedcad789d0abd8be76463277dc01bf32c4e6a527b /src/engine/octaedit.cpp
parentb2c89d7060e99a36c8c7ac897b7386686c74deac (diff)
downloadxolatile-badassbug-757096e7df15c14b9b10352fa91663483f9e34f8.tar.xz
xolatile-badassbug-757096e7df15c14b9b10352fa91663483f9e34f8.tar.zst
all
Diffstat (limited to 'src/engine/octaedit.cpp')
-rw-r--r--src/engine/octaedit.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/engine/octaedit.cpp b/src/engine/octaedit.cpp
index 80e2b03..61d8917 100644
--- a/src/engine/octaedit.cpp
+++ b/src/engine/octaedit.cpp
@@ -291,7 +291,7 @@ bool editmoveplane(const vec &o, const vec &ray, int d, float off, vec &handle,
extern void entdrag(const vec &ray);
extern bool hoveringonent(int ent, int orient);
-extern void renderentselection(const vec &o, bool entmoving);
+extern void renderentselection(bool entmoving);
extern float rayent(const vec &o, const vec &ray, float radius, int mode, int size, int &orient, int &ent);
VAR(gridlookup, 0, 0, 1);
@@ -411,7 +411,7 @@ void rendereditcursor() {
glBlendFunc(GL_ONE, GL_ONE);
// cursors
notextureshader->set();
- renderentselection(player->o, entmoving!=0);
+ renderentselection(entmoving!=0);
boxoutline = outline!=0;
enablepolygonoffset(GL_POLYGON_OFFSET_LINE);
if(!moving && !hovering && !hidecursor) {
@@ -537,14 +537,6 @@ void selgridmap(selinfo &sel, uchar *g) { // generates a map of the cube
VARP(nompedit, 0, 1, 1);
-static inline int countblock(cube *c, int n = 8) {
- int r = 0;
- loopi(n) if(c[i].children) r += countblock(c[i].children); else ++r;
- return r;
-}
-
-static int countblock(block3 *b) { return countblock(b->c(), b->size()); }
-
vector<editinfo *> editinfos;
editinfo *localedit = NULL;