From 22d0f6484ccd28911d7c0549d93342c0f52322f1 Mon Sep 17 00:00:00 2001 From: driAn Date: Tue, 21 Oct 2008 21:15:39 +0000 Subject: [PATCH] merge wizard into server code git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3171 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/protocol.cpp | 3 +-- source/src/protos.h | 1 + source/src/server.cpp | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/source/src/protocol.cpp b/source/src/protocol.cpp index d7d73dde..b419c4a5 100644 --- a/source/src/protocol.cpp +++ b/source/src/protocol.cpp @@ -7,8 +7,7 @@ #ifdef _DEBUG bool protocoldbg = false; void protocoldebug(bool enable) { protocoldbg = enable; } -extern int networkdebug; -#define DEBUGCOND (protocoldbg && networkdebug==1) +#define DEBUGCOND (protocoldbg) #endif // all network traffic is in 32bit ints, which are then compressed using the following simple scheme (assumes that most values are small). diff --git a/source/src/protos.h b/source/src/protos.h index 21b10171..a17fea5f 100644 --- a/source/src/protos.h +++ b/source/src/protos.h @@ -651,6 +651,7 @@ extern void extinfo_cnbuf(ucharbuf &p, int cn); extern void extinfo_statsbuf(ucharbuf &p, int pid, int bpos, ENetSocket &pongsock, ENetAddress &addr, ENetBuffer &buf, int len); extern void extinfo_teamscorebuf(ucharbuf &p); extern char *votestring(int type, char *arg1, char *arg2); +extern int wizardmain(int argc, char **argv); // demo #define DHDR_DESCCHARS 80 diff --git a/source/src/server.cpp b/source/src/server.cpp index 6235d016..78eed6ab 100644 --- a/source/src/server.cpp +++ b/source/src/server.cpp @@ -3421,6 +3421,12 @@ int main(int argc, char **argv) char *a = &argv[i][2]; if(argv[i][0]=='-') switch(argv[i][1]) { + case '-': + if(!strncmp(argv[i], "--wizard", 8)) + { + return wizardmain(argc-1, argv+1); + } + break; case 'u': uprate = atoi(a); break; case 'n': switch(*a)