diff --git a/source/src/cube.h b/source/src/cube.h index 392b44ea..e80e042d 100644 --- a/source/src/cube.h +++ b/source/src/cube.h @@ -31,6 +31,7 @@ extern vector players; // all the other clients (in multiplayer extern vector bounceents; extern bool editmode; extern vector ents; // map entities +extern vector eh_ents; // edithide entities extern vec worldpos, camup, camright, camdir; // current target of the crosshair in the world extern int lastmillis, totalmillis; // last time extern int curtime; // current frame time diff --git a/source/src/entities.cpp b/source/src/entities.cpp index 40384dc9..8604dd46 100644 --- a/source/src/entities.cpp +++ b/source/src/entities.cpp @@ -3,7 +3,7 @@ #include "cube.h" vector ents; - +vector eh_ents; // edithide entities const char *entmdlnames[] = { "pickups/pistolclips", "pickups/ammobox", "pickups/nade", "pickups/health", "pickups/helmet", "pickups/kevlar", "pickups/akimbo", "pickups/nades", //FIXME @@ -67,6 +67,52 @@ void rendermapmodels() VAR(showmodelclipping, 0, 0, 1); +void showedithide() +{ + loopv(eh_ents) + { + if(eh_ents[i]>0 && eh_ents[i]0 && sno).dot(camdir) < 0) continue; particle_splash(i == closest ? 12 : 2, 2, 40, v); diff --git a/source/src/world.cpp b/source/src/world.cpp index 3bebddbe..ff882f7c 100644 --- a/source/src/world.cpp +++ b/source/src/world.cpp @@ -141,6 +141,9 @@ int closestent() // used for delent and edit mode ent display entity &e = ents[i]; if(e.type==NOTUSED) continue; if(clenttype != NOTUSED && e.type != clenttype) continue; + bool ice = false; + loopk(eh_ents.length()) if(eh_ents[k]==e.type) ice = true; + if(ice) continue; vec v(e.x, e.y, e.z); float dist = v.dist(camera1->o); if(j)