From d0de8aca2d3d242dbbc13f1d65aefebbab4d1426 Mon Sep 17 00:00:00 2001 From: driAn Date: Sat, 3 May 2008 17:37:52 +0000 Subject: [PATCH] flag pickup git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1842 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/entities.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/source/src/entities.cpp b/source/src/entities.cpp index 7c98d275..cfccbe36 100644 --- a/source/src/entities.cpp +++ b/source/src/entities.cpp @@ -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); + } } }