fixed crouch lock-in and being stuck on stairs

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1460 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2007-12-15 17:15:36 +00:00
parent e83a2e6eac
commit 259c4d48cf
2 changed files with 5 additions and 4 deletions
+3 -2
View File
@@ -207,6 +207,7 @@ void checkitems(playerent *d)
{
if(editmode) return;
d->onladder = false;
float eyeheight = d->dyneyeheight();
loopv(ents)
{
entity &e = ents[i];
@@ -216,14 +217,14 @@ void checkitems(playerent *d)
if(OUTBORD(e.x, e.y)) continue;
vec v(e.x, e.y, d->o.z);
float dist1 = d->o.dist(v);
float dist2 = d->o.z - (S(e.x, e.y)->floor+d->dyneyeheight());
float dist2 = d->o.z - (S(e.x, e.y)->floor+eyeheight);
if(dist1<1.5f && dist2<e.attr1) trypickup(i, d);
continue;
}
if(!e.spawned) continue;
if(OUTBORD(e.x, e.y)) continue;
vec v(e.x, e.y, S(e.x, e.y)->floor+d->dyneyeheight());
vec v(e.x, e.y, S(e.x, e.y)->floor+eyeheight);
if(d->o.dist(v)<2.5f) trypickup(i, d);
}
}