From 1ff76cd1b5bbf898631a4d74175302a8da93566a Mon Sep 17 00:00:00 2001 From: driAn Date: Tue, 2 Oct 2007 19:25:52 +0000 Subject: [PATCH] no message git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1332 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/clientgame.cpp | 3 +++ source/src/entities.cpp | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/source/src/clientgame.cpp b/source/src/clientgame.cpp index 69434059..93a3ea00 100644 --- a/source/src/clientgame.cpp +++ b/source/src/clientgame.cpp @@ -620,6 +620,9 @@ void flagmsg(int flag, int action) } } +void dropflag() { tryflagdrop(false); } +COMMAND(dropflag, ARG_NONE); + votedisplayinfo *newvotedisplayinfo(playerent *owner, int type, char *arg1, char *arg2) { if(type < 0 || type >= SA_NUM) return NULL; diff --git a/source/src/entities.cpp b/source/src/entities.cpp index 538148ed..78ffd99f 100644 --- a/source/src/entities.cpp +++ b/source/src/entities.cpp @@ -316,8 +316,11 @@ bool intersect(entity *e, vec &from, vec &to, vec *end) // if lineseg hits entit // flag ent actions done by the local player +int flagdropmillis = 0; + void flagpickup() { + if(flagdropmillis && flagdropmillis>lastmillis) return; flaginfo &f = flaginfos[team_opposite(team_int(player1->team))]; f.flag->spawned = false; f.state = CTFF_STOLEN; @@ -335,6 +338,7 @@ void tryflagdrop(bool reset) f.flag->spawned = false; f.state = CTFF_DROPPED; f.ack = false; + flagdropmillis = lastmillis+1000; addmsg(reset ? SV_FLAGRESET : SV_FLAGDROP, "ri", f.team); } }