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:
+11
-2
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user