diff --git a/source/src/entities.cpp b/source/src/entities.cpp index f0bc4367..8bf19786 100644 --- a/source/src/entities.cpp +++ b/source/src/entities.cpp @@ -30,9 +30,9 @@ void renderent(entity &e) void renderclip(entity &e) { - float radius = max(float(e.attr2), 0.1f); - vec bbmin(e.x - radius, e.y - radius, float(S(e.x, e.y)->floor+e.attr1)), - bbmax(e.x + radius, e.y + radius, bbmin.z + max(float(e.attr3), 1.0f)); + float xradius = max(float(e.attr2), 0.1f), yradius = max(float(e.attr3), 0.1f); + vec bbmin(e.x - xradius, e.y - yradius, float(S(e.x, e.y)->floor+e.attr1)), + bbmax(e.x + xradius, e.y + yradius, bbmin.z + max(float(e.attr4), 0.1f)); glDisable(GL_TEXTURE_2D); linestyle(1, 0xFF, 0xFF, 0); diff --git a/source/src/physics.cpp b/source/src/physics.cpp index e5829b87..2945789c 100644 --- a/source/src/physics.cpp +++ b/source/src/physics.cpp @@ -116,10 +116,9 @@ bool mmcollide(physent *d, float &hi, float &lo) // collide with a map entity &e = ents[i]; if(e.type==CLIP) { - const float r = e.attr2 + d->radius; - if(fabs(e.x-d->o.x)o.y)o.x) < e.attr2 + d->radius && fabs(e.y-d->o.y) < e.attr3 + d->radius) { - const float cz = float(S(e.x, e.y)->floor+e.attr1), ch = max(float(e.attr3), 1.0f); + const float cz = float(S(e.x, e.y)->floor+e.attr1), ch = float(e.attr4); const float dz = d->o.z-d->eyeheight; if(dzlo) lo = cz+ch; diff --git a/source/src/world.cpp b/source/src/world.cpp index 8187d654..e457ee29 100644 --- a/source/src/world.cpp +++ b/source/src/world.cpp @@ -213,11 +213,6 @@ entity *newentity(int index, int x, int y, int z, char *what, int v1, int v2, in switch(type) { - case CLIP: - if(v2<0) e.attr2 = 0; - if(v3<=0) e.attr3 = 1; - break; - case LIGHT: if(v1>64) e.attr1 = 64; if(!v1) e.attr1 = 16;