no message

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1032 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2007-05-30 21:54:21 +00:00
parent 3ab87d5a5f
commit dc5a9a2b8b
3 changed files with 10 additions and 10 deletions
+4 -4
View File
@@ -161,7 +161,7 @@ VARF(gamespeed, 10, 100, 1000, if(multiplayer()) gamespeed = 100);
int main(int argc, char **argv)
{
bool dedicated = false;
int fs = SDL_FULLSCREEN, depth = 0, bpp = 0, fsaa = 0, vsync = -1, par = 0, uprate = 0, maxcl = DEFAULTCLIENTS, tkthreshold = 2;
int fs = SDL_FULLSCREEN, depth = 0, bpp = 0, fsaa = 0, vsync = -1, par = 0, uprate = 0, maxcl = DEFAULTCLIENTS, tkthreshold = -5;
char *sdesc = "", *ip = "", *master = NULL, *passwd = "", *maprot = NULL, *adminpwd = NULL, *srvmsg = NULL;
#define initlog(s) puts("init: " s)
@@ -257,9 +257,9 @@ int main(int argc, char **argv)
initlog("cfg");
extern void *scoremenu, *teammenu, *ctfmenu, *servmenu, *kickmenu, *banmenu, *docmenu;
scoremenu = addmenu("score", "frags\tdeaths\tpj\tping\tname\tcn", false, renderscores);
teammenu = addmenu("team score", "frags\tdeaths\tpj\tping\tteam\tname\tcn", false, renderscores);
ctfmenu = addmenu("ctf score", "flags\tdeaths\tfrags\tpj\tping\tteam\tname\tcn", false, renderscores);
scoremenu = addmenu("score", "frags\tdeath\tpj\tping\tname\tcn", false, renderscores);
teammenu = addmenu("team score", "frags\tdeath\tpj\tping\tteam\tname\tcn", false, renderscores);
ctfmenu = addmenu("ctf score", "flags\tdeath\tfrags\tpj\tping\tteam\tname\tcn", false, renderscores);
servmenu = addmenu("server", "ping\tplr\tserver", true, refreshservers);
kickmenu = addmenu("kick player", NULL, true, refreshmastermenu);
banmenu = addmenu("ban player", NULL, true, refreshmastermenu);
+1 -1
View File
@@ -31,7 +31,7 @@ enum { SOPCMD_KICK = 0, SOPCMD_BAN, SOPCMD_REMBANS, SOPCMD_MASTERMODE, SOPCMD_AU
#define DAF 1.0f
#define DVF 100.0f
enum { DISC_NONE = 0, DISC_EOP, DISC_CN, DISC_MKICK, DISC_MBAN, DISC_TAGT, DISC_BANREFUSE, DISC_WRONGPW, DISC_MLOGINFAIL, DISC_MAXCLIENTS, DISC_MASTERMODE, DISC_NUM };
enum { DISC_NONE = 0, DISC_EOP, DISC_CN, DISC_MKICK, DISC_MBAN, DISC_TAGT, DISC_BANREFUSE, DISC_WRONGPW, DISC_MLOGINFAIL, DISC_MAXCLIENTS, DISC_MASTERMODE, DISC_AUTOKICK, DISC_NUM };
/* Gamemodes
0 tdm
+5 -5
View File
@@ -443,7 +443,7 @@ void sendteamtext(char *text, int sender)
if(packet->referenceCount==0) enet_packet_destroy(packet);
}
char *disc_reasons[] = { "normal", "end of packet", "client num", "kicked by server operator", "banned by server operator", "tag type", "connection refused due to ban", "wrong password", "failed admin login", "server FULL - maxclients", "server mastermode is \"private\"" };
char *disc_reasons[] = { "normal", "end of packet", "client num", "kicked by server operator", "banned by server operator", "tag type", "connection refused due to ban", "wrong password", "failed admin login", "server FULL - maxclients", "server mastermode is \"private\"", "auto kick - did your score drop below the threshold?" };
void disconnect_client(int n, int reason = -1)
{
@@ -963,6 +963,7 @@ void process(ENetPacket *packet, int sender, int chan) // sender may be -1
case SV_FRAGS:
cl->score.frags = getint(p);
if(cl->score.frags < teamkillthreshold) disconnect_client(sender, DISC_AUTOKICK);
QUEUE_MSG;
break;
@@ -975,10 +976,9 @@ void process(ENetPacket *packet, int sender, int chan) // sender may be -1
case SV_DIED:
getint(p);
if(m_arena) cl->arenadeath = true;
cl->score.lifesequence++; // FIXME
cl->score.lifesequence++;
QUEUE_MSG;
break;
default:
{
int size = msgsizelookup(type);
@@ -1240,7 +1240,7 @@ void initserver(bool dedicated, int uprate, char *sdesc, char *ip, char *master,
readscfg(path(maprot));
if(adminpwd && adminpwd[0]) adminpasswd = adminpwd;
if(srvmsg && srvmsg[0]) motd = srvmsg;
teamkillthreshold = tkthreshold;
teamkillthreshold = min(-1, tkthreshold);
}
resetserverifempty();
@@ -1264,7 +1264,7 @@ void fatal(char *s, char *o) { cleanupserver(); printf("fatal: %s\n", s); exit(E
int main(int argc, char **argv)
{
int uprate = 0, maxcl = DEFAULTCLIENTS, tkthreshold = 2;
int uprate = 0, maxcl = DEFAULTCLIENTS, tkthreshold = -5;
char *sdesc = "", *ip = "", *master = NULL, *passwd = "", *maprot = "", *adminpasswd = NULL, *srvmsg = NULL;
for(int i = 1; i<argc; i++)