fix ctf race condition

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4561 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
ac_stef
2009-07-02 11:50:49 +00:00
parent d0a30b2050
commit 7406992171
3 changed files with 7 additions and 5 deletions
+2 -1
View File
@@ -338,12 +338,13 @@ void flagpickup(int fln)
{
if(flagdropmillis && flagdropmillis>lastmillis) return;
flaginfo &f = flaginfos[fln];
int action = f.state == CTFF_INBASE ? FA_STEAL : FA_PICKUP;
f.flagent->spawned = false;
f.state = CTFF_STOLEN;
f.actor = player1; // do this although we don't know if we picked the flag to avoid getting it after a possible respawn
f.actor_cn = getclientnum();
f.ack = false;
addmsg(SV_FLAGACTION, "rii", FA_PICKUP, f.team);
addmsg(SV_FLAGACTION, "rii", action, f.team);
}
void tryflagdrop(bool manual)