summaryrefslogtreecommitdiff
path: root/src/engine/world.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/world.cpp
parentb2c89d7060e99a36c8c7ac897b7386686c74deac (diff)
downloadxolatile-badassbug-757096e7df15c14b9b10352fa91663483f9e34f8.tar.xz
xolatile-badassbug-757096e7df15c14b9b10352fa91663483f9e34f8.tar.zst
all
Diffstat (limited to 'src/engine/world.cpp')
-rw-r--r--src/engine/world.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/engine/world.cpp b/src/engine/world.cpp
index cbe3fad..69a78d0 100644
--- a/src/engine/world.cpp
+++ b/src/engine/world.cpp
@@ -280,19 +280,17 @@ vec getselpos() {
void entflip() {
if(noentedit()) return;
- int d = dimension(sel.orient);
- float mid = sel.s[d]*sel.grid/2+sel.o[d];
- groupeditpure(e.o[d] -= (e.o[d]-mid)*2);
+ int d = dimension(sel.orient); (void) d;
+ groupeditpure(e.o[d] -= (e.o[d]-(sel.s[d]*sel.grid/2+sel.o[d]))*2);
}
void entrotate(int *cw) {
if(noentedit()) return;
int d = dimension(sel.orient);
int dd = (*cw<0) == dimcoord(sel.orient) ? R[d] : C[d];
- float mid = sel.s[dd]*sel.grid/2+sel.o[dd];
vec s(sel.o.v);
groupeditpure(
- e.o[dd] -= (e.o[dd]-mid)*2;
+ e.o[dd] -= (e.o[dd]-(sel.s[dd]*sel.grid/2+sel.o[dd]))*2;
e.o.sub(s);
swap(e.o[R[d]], e.o[C[d]]);
e.o.add(s);
@@ -335,7 +333,7 @@ int entmoving = 0;
void entdrag(const vec &ray) {
if(noentedit() || !haveselent()) return;
- float r = 0, c = 0;
+ float r = 0, c = 0; (void) r; (void) c;
static vec v, handle;
vec eo, es;
int d = dimension(entorient),
@@ -459,7 +457,7 @@ static void renderentbox(const vec &eo, vec es) {
gle::attrib(eo.x, es.y, eo.z); gle::attrib(eo.x, es.y, es.z);
}
-void renderentselection(const vec &o, bool entmoving) {
+void renderentselection(bool entmoving) {
if(noentedit()) return;
vec eo, es;
if(entgroup.length()) {
@@ -723,7 +721,6 @@ void entpaste() {
keepents = max(keepents, idx+1);
}
keepents = 0;
- int j = 0;
}
COMMAND(newent, "siiiii");
@@ -733,6 +730,7 @@ COMMAND(entcopy, "");
COMMAND(entpaste, "");
void entset(char *what, int *a1, int *a2, int *a3, int *a4, int *a5) {
+ (void) a1; (void) a2; (void) a3; (void) a4; (void) a5;
if(noentedit()) return;
int type = findtype(what);
if(type != ET_EMPTY)
@@ -775,6 +773,7 @@ void enttype(char *type, int *numargs) {
}
void entattr(int *attr, int *val, int *numargs) {
+ (void) val;
if(*numargs >= 2) {
if(*attr >= 0 && *attr <= 4)
groupedit(
@@ -880,7 +879,6 @@ void splitocta(cube *c, int size) {
void resetmap() {
clearoverrides();
- clearmapsounds();
resetlightmaps();
clearslots();
clearparticles();