special pickup code for ctf-flags

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1820 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2008-04-21 18:44:40 +00:00
parent 87255ec362
commit 1573eb8b91
+2 -2
View File
@@ -124,7 +124,7 @@ void trypickup(int n, playerent *d)
flaginfo &of = flaginfos[team_opposite(flag)];
if(f.state == CTFF_STOLEN) break;
if(flag == team_int(d->team)) // its the own flag
if(flag == team_int(d->team)) // it's the own flag
{
if(f.state == CTFF_DROPPED) flagreturn();
else if(f.state == CTFF_INBASE && of.state == CTFF_STOLEN && of.actor == d && of.ack) flagscore();
@@ -157,7 +157,7 @@ void checkitems(playerent *d)
if(!e.spawned) continue;
if(OUTBORD(e.x, e.y)) continue;
vec v(e.x, e.y, S(e.x, e.y)->floor+eyeheight);
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);
}
}