From 50736432e38ef6306d961b8a00347acb3585b476 Mon Sep 17 00:00:00 2001 From: driAn Date: Sat, 11 Nov 2006 00:54:17 +0000 Subject: [PATCH] no message git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@572 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/clients2c.cpp | 7 ++++++- source/src/entities.cpp | 1 + source/src/server.cpp | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/source/src/clients2c.cpp b/source/src/clients2c.cpp index 1f3df5bb..e4cf7192 100644 --- a/source/src/clients2c.cpp +++ b/source/src/clients2c.cpp @@ -471,19 +471,23 @@ void parsemessages(int cn, playerent *d, ucharbuf &p) // EDIT: AH case SV_FLAGINFO: { + conoutf("received server flag answer 1"); //fixme int flag = getint(p); if(flag<0||flag>1) return; flaginfo &f = flaginfos[flag]; f.state = getint(p); int action = getint(p); - if(f.state==CTFF_STOLEN) + conoutf("received server flag answer 2"); + if(f.state==CTFF_STOLEN) { + conoutf("flag stolen"); //fixme int actor_cn = getint(p); f.actor = actor_cn == getclientnum() ? player1 : getclient(actor_cn); f.flag->spawned = false; } else if(f.state==CTFF_DROPPED) { + conoutf("flag dropped"); //fixme f.flag->x = (ushort) (getint(p)/DMF); f.flag->y = (ushort) (getint(p)/DMF); f.flag->z = (ushort) (getint(p)/DMF); @@ -500,6 +504,7 @@ void parsemessages(int cn, playerent *d, ucharbuf &p) } else if(f.state==CTFF_INBASE) { + conoutf("flag in base"); //fixme if(action==SV_FLAGRETURN) { int returnerer_cn = getint(p); diff --git a/source/src/entities.cpp b/source/src/entities.cpp index 5c9a6c2a..68b46559 100644 --- a/source/src/entities.cpp +++ b/source/src/entities.cpp @@ -206,6 +206,7 @@ void pickup(int n, playerent *d) } else if(!isownflag) { + conoutf("asking the server for pickup ACK"); //fixme addmsg(SV_FLAGPICKUP, "ri", team); ents[n].spawned = false; f.actor = player1; // do this although we don't know if we picked the flag to avoid getting it after a possible respawn diff --git a/source/src/server.cpp b/source/src/server.cpp index fc122470..7463ceaa 100644 --- a/source/src/server.cpp +++ b/source/src/server.cpp @@ -950,6 +950,7 @@ void process(ENetPacket *packet, int sender, int chan) // sender may be -1 f.actor_cn = sender; f.lastupdate = lastsec; sendflaginfo(flag, SV_FLAGPICKUP); + printf("flag picked by %s\n", clients[sender]->name); }; break; };