no message

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@429 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2006-10-11 19:48:57 +00:00
parent 85c1162bd6
commit 6b964684ae
13 changed files with 116 additions and 70 deletions
+11 -1
View File
@@ -182,6 +182,7 @@ string toservermap;
bool senditemstoserver = false; // after a map change, since server doesn't have map data
string clientpassword;
char *toserverpwd = NULL;
void password(char *p) { strcpy_s(clientpassword, p); };
COMMAND(password, ARG_1STR);
@@ -192,6 +193,7 @@ void initclientnet()
ctext[0] = 0;
toservermap[0] = 0;
clientpassword[0] = 0;
toserverpwd = NULL;
newname("unnamed");
ctf_team("red");
};
@@ -212,7 +214,15 @@ void c2sinfo(dynent *d) // send update to the server
uchar *start = packet->data;
uchar *p = start+2;
bool serveriteminitdone = false;
if(toservermap[0]) // suggest server to change map
if(toserverpwd)
{
packet->flags = ENET_PACKET_FLAG_RELIABLE;
putint(p, SV_PWD);
sendstring(toserverpwd, p);
toserverpwd[0] = 0;
toserverpwd = NULL;
}
else if(toservermap[0]) // suggest server to change map
{ // do this exclusively as map change may invalidate rest of update
packet->flags = ENET_PACKET_FLAG_RELIABLE;
putint(p, SV_MAPCHANGE);