no message
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@374 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
+4
-1
@@ -404,7 +404,8 @@ extern bool demoplayback;
|
||||
4 - team survior
|
||||
5 - ctf
|
||||
6 - pistols
|
||||
7 - botmatch
|
||||
7 - bot dm
|
||||
8 - bot tdm
|
||||
*/
|
||||
|
||||
#define m_noitems (m_arena)
|
||||
@@ -420,6 +421,8 @@ 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
|
||||
|
||||
@@ -197,6 +197,7 @@ int main(int argc, char **argv)
|
||||
|
||||
log("mainloop");
|
||||
int ignore = 5;
|
||||
int lastflush = 0;
|
||||
for(;;)
|
||||
{
|
||||
int millis = SDL_GetTicks()*gamespeed/100;
|
||||
@@ -248,6 +249,7 @@ int main(int argc, char **argv)
|
||||
break;
|
||||
};
|
||||
};
|
||||
if(millis>lastflush+60000) { fflush(stdout); lastflush = millis; }
|
||||
};
|
||||
quit();
|
||||
return 1;
|
||||
|
||||
@@ -555,7 +555,9 @@ void process(ENetPacket * packet, int sender) // sender may be -1
|
||||
sgetstr();
|
||||
int reqmode = getint(p);
|
||||
if(reqmode<0) reqmode = 0;
|
||||
printf("SV_MAPCHANGE %i %s", reqmode, text);
|
||||
if(smapname[0] && !mapreload && !vote(text, reqmode, sender)) return;
|
||||
printf(" - accepted\n");
|
||||
mapreload = false;
|
||||
mode = reqmode;
|
||||
minremain = m_ctf_s ? 10 : (mode&1 ? 15 : 10);
|
||||
@@ -781,7 +783,7 @@ void checkintermission()
|
||||
send2(true, -1, SV_TIMEUP, minremain--);
|
||||
};
|
||||
|
||||
void startintermission() { minremain = 0; checkintermission(); };
|
||||
/*void startintermission() { minremain = 0; checkintermission(); };*/
|
||||
|
||||
void resetserverifempty()
|
||||
{
|
||||
@@ -832,7 +834,8 @@ 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((mode>1 || (mode==0 && nonlocalclients)) && seconds>mapend-minremain*60) checkintermission();
|
||||
if(((srvm_notimelimit && !nonlocalclients) || (mode==0 && nonlocalclients)) && seconds>mapend-minremain*60) checkintermission();
|
||||
if(interm && seconds>interm)
|
||||
{
|
||||
interm = 0;
|
||||
@@ -844,10 +847,10 @@ void serverslice(int seconds, unsigned int timeout) // main server update, cal
|
||||
changemap();
|
||||
ctfbroadcast = true;
|
||||
}
|
||||
else
|
||||
loopv(clients) if(clients[i].type!=ST_EMPTY)
|
||||
else loopv(clients) if(clients[i].type!=ST_EMPTY)
|
||||
{
|
||||
send2(true, i, SV_MAPRELOAD, 0); // ask a client to trigger map reload
|
||||
printf("SV_MAPRELOAD\n"); //fixme
|
||||
mapreload = true;
|
||||
break;
|
||||
};
|
||||
@@ -871,7 +874,7 @@ void serverslice(int seconds, unsigned int timeout) // main server update, cal
|
||||
nonlocalclients = 0;
|
||||
loopv(clients) if(clients[i].type==ST_TCPIP) nonlocalclients++;
|
||||
laststatus = seconds;
|
||||
if(nonlocalclients || bsend || brec) printf("status: %d remote clients, %.1f send, %.1f rec (K/sec)\n", nonlocalclients, bsend/60.0f/1024, brec/60.0f/1024);
|
||||
if(nonlocalclients || bsend || brec) { printf("status: %d remote clients, %.1f send, %.1f rec (K/sec)\n", nonlocalclients, bsend/60.0f/1024, brec/60.0f/1024); fflush(stdout); }
|
||||
bsend = brec = 0;
|
||||
};
|
||||
|
||||
@@ -912,9 +915,6 @@ void serverslice(int seconds, unsigned int timeout) // main server update, cal
|
||||
disconnect_client(lastconnect, "maxclients reached");
|
||||
};
|
||||
};
|
||||
#ifndef WIN32
|
||||
fflush(stdout);
|
||||
#endif
|
||||
};
|
||||
|
||||
void cleanupserver()
|
||||
|
||||
Binary file not shown.
@@ -433,6 +433,9 @@
|
||||
<Filter
|
||||
Name="enet"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="..\enet\callbacks.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\enet\host.c">
|
||||
<FileConfiguration
|
||||
|
||||
Reference in New Issue
Block a user