no message
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@616 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
+10
-1
@@ -214,8 +214,8 @@ void addmsg(int type, const char *fmt, ...)
|
||||
int lastupdate = 0, lastping = 0;
|
||||
bool senditemstoserver = false; // after a map change, since server doesn't have map data
|
||||
|
||||
bool sendpwd = false;
|
||||
string clientpassword;
|
||||
char *toserverpwd = NULL;
|
||||
void password(char *p) { s_strcpy(clientpassword, p); };
|
||||
COMMAND(password, ARG_1STR);
|
||||
|
||||
@@ -250,6 +250,15 @@ void c2sinfo(dynent *d) // send update to the server
|
||||
ENetPacket *packet = enet_packet_create(NULL, 100, 0);
|
||||
ucharbuf q(packet->data, packet->dataLength);
|
||||
|
||||
if(sendpwd && clientpassword[0])
|
||||
{
|
||||
packet->flags = ENET_PACKET_FLAG_RELIABLE;
|
||||
putint(q, SV_PWD);
|
||||
sendstring(clientpassword, q);
|
||||
clientpassword[0] = 0; // avoid sending pwd to other servers on connect
|
||||
sendpwd = false;
|
||||
};
|
||||
|
||||
putint(q, SV_POS);
|
||||
putint(q, clientnum);
|
||||
putuint(q, (int)(d->o.x*DMF)); // quantize coordinates to 1/16th of a cube, between 1 and 3 bytes
|
||||
|
||||
Reference in New Issue
Block a user