From 93ae9f3231a77cde667ad7544e031d8995cdffe2 Mon Sep 17 00:00:00 2001 From: driAn Date: Mon, 18 Sep 2006 19:32:46 +0000 Subject: [PATCH] no message git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@410 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- config/default_map_settings.cfg | 2 +- source/src/cube.h | 8 +++----- source/src/entities.cpp | 5 +++-- source/src/server.cpp | 11 ++++++----- source/src/serverutil.cpp | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/config/default_map_settings.cfg b/config/default_map_settings.cfg index 3e761d32..392419b0 100755 --- a/config/default_map_settings.cfg +++ b/config/default_map_settings.cfg @@ -90,7 +90,7 @@ loadsky "textures/skymaps/steini/steini4" texturereset // starts the texture slot/index at 0 -texture 0 "kurt/klite1.jpg" //damn dummy +texture 0 "kurt/klite1.jpg" //dummy //-------------water-uncomment all but one!------ diff --git a/source/src/cube.h b/source/src/cube.h index 95f292e5..fd83fbf6 100644 --- a/source/src/cube.h +++ b/source/src/cube.h @@ -292,7 +292,7 @@ enum { M_NONE = 0, M_SEARCH, M_HOME, M_ATTACKING, M_PAIN, M_SLEEP, M_AIMING, M_N #define MAXTRANS 5000 // max amount of data to swallow in 1 go #define CUBE_SERVER_PORT 28765 #define CUBE_SERVINFO_PORT 28766 -#define PROTOCOL_VERSION 121 // bump when protocol changes +#define PROTOCOL_VERSION 123 // bump when protocol changes #define WEAPONCHANGE_TIME 400 @@ -404,8 +404,8 @@ extern bool demoplayback; 4 - team survior 5 - ctf 6 - pistols -7 - bot dm -8 - bot tdm +7 - bot tdm +8 - bot dm 9 - last swiss standing */ @@ -425,8 +425,6 @@ extern bool demoplayback; //#define m_classicsp (gamemode==-2) #define isteam(a,b) (m_teammode && strcmp(a, b)==0) -#define srvm_notimelimit (mode==1 || mode==7 || mode==8) - #define TEAM_CLA 0 // #define TEAM_RVSF 1 // // rb means red/blue diff --git a/source/src/entities.cpp b/source/src/entities.cpp index d980f701..3569c8d6 100644 --- a/source/src/entities.cpp +++ b/source/src/entities.cpp @@ -255,11 +255,12 @@ void putitems(uchar *&p) // puts items in network stream and also spa void resetspawns() { loopv(ents) ents[i].spawned = false; - if(m_noitemsnade) + if(m_noitemsnade || m_pistol) loopv(ents) { entity &e = ents[i]; - if(e.type == I_CLIPS || e.type == I_AMMO) e.type = I_GRENADE; + if(m_noitemsnade && (e.type == I_CLIPS || e.type == I_AMMO)) e.type = I_GRENADE; + else if(m_pistol && e.type==I_AMMO) e.type = I_CLIPS; } }; void setspawn(int i, bool on) { if(i=0) ents[i].spawned = on; }; diff --git a/source/src/server.cpp b/source/src/server.cpp index ae0d7de3..c84dd326 100644 --- a/source/src/server.cpp +++ b/source/src/server.cpp @@ -4,6 +4,8 @@ #include "cube.h" #define m_ctf_s (mode==5) +#define m_teammode_s (gamemode==0 || gamemode==4 || gamemode==5) +#define m_notimelimit_s (mode==1) enum { ST_EMPTY, ST_LOCAL, ST_TCPIP }; @@ -32,7 +34,7 @@ string smapname; int numclients() { int num = 0; - loopv(clients) if(clients[i].type!=ST_EMPTY) i++; + loopv(clients) if(clients[i].type!=ST_EMPTY) num++; return num; }; @@ -289,7 +291,7 @@ bool vote(char *map, int reqmode, int sender) if(yes/(float)(yes+no) <= 0.5f) return false; sendservmsg("vote passed"); resetvotes(); - return true; + return true; }; // Added by Rick: Vote for bot commands @@ -556,7 +558,7 @@ void process(ENetPacket * packet, int sender) // sender may be -1 if(smapname[0] && !mapreload && !vote(text, reqmode, sender)) return; mapreload = false; mode = reqmode; - minremain = m_ctf_s ? 10 : (mode&1 ? 15 : 10); + minremain = m_ctf_s ? 10 : (m_teammode_s ? 15 : 10); mapend = lastsec+minremain*60; interm = 0; strcpy_s(smapname, text); @@ -826,8 +828,7 @@ void serverslice(int seconds, unsigned int timeout) // main server update, cal lastsec = seconds; - //if((mode>1 || (mode==0 && nonlocalclients)) && seconds>mapend-minremain*60) checkintermission(); - if(((srvm_notimelimit && !nonlocalclients) || (mode==0 && nonlocalclients)) && seconds>mapend-minremain*60) checkintermission(); + if((mode>1 || (mode==0 && nonlocalclients)) && seconds>mapend-minremain*60) checkintermission(); if(interm && seconds>interm) { interm = 0; diff --git a/source/src/serverutil.cpp b/source/src/serverutil.cpp index d77a10f4..c55b7f9c 100644 --- a/source/src/serverutil.cpp +++ b/source/src/serverutil.cpp @@ -29,7 +29,7 @@ void sendstring(char *t, uchar *&p) const char *modenames[] = { "team deathmatch", "coopedit", "deathmatch", "survior", - "team survior", "ctf", "pistols only", "bot team deathmatch", "bot deathmatch", "last swiss standing", + "team survior", "ctf", "pistols frenzy", "bot team deathmatch", "bot deathmatch", "last swiss standing", }; //const char *modestr(int n) { return (n>=-2 && n<12) ? modenames[n+2] : "unknown"; };