flag pickup

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1842 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2008-05-03 17:37:52 +00:00
parent 709c58d2da
commit d0de8aca2d
+11 -2
View File
@@ -157,8 +157,17 @@ void checkitems(playerent *d)
if(!e.spawned) continue;
if(OUTBORD(e.x, e.y)) continue;
vec v(e.x, e.y, e.type == CTF_FLAG ? e.z : S(e.x, e.y)->floor+eyeheight);
if(d->o.dist(v)<2.5f) trypickup(i, d);
if(e.type==CTF_FLAG)
{
vec v(e.x, e.y, e.z);
if(d->o.dist(v)<5.0f) trypickup(i, d);
}
else
{
vec v(e.x, e.y, S(e.x, e.y)->floor+eyeheight);
if(d->o.dist(v)<2.5f) trypickup(i, d);
}
}
}