sending defs to ms

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6756 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Rafael Barreto
2012-02-09 16:16:16 +00:00
parent b8b83e52a2
commit aa10c09bd3
3 changed files with 13 additions and 7 deletions
+11 -6
View File
@@ -556,12 +556,9 @@ void c2sinfo(playerent *d) // send update to the server
lastupdate = totalmillis;
}
void sendintro()
int getbuildtype()
{
packetbuf p(MAXTRANS, ENET_PACKET_FLAG_RELIABLE);
putint(p, SV_CONNECT);
putint(p, AC_VERSION);
putint(p, (isbigendian() ? 0x80 : 0 )|(adler((unsigned char *)guns, sizeof(guns)) % 31 << 8)|
return (isbigendian() ? 0x80 : 0 )|(adler((unsigned char *)guns, sizeof(guns)) % 31 << 8)|
#ifdef WIN32
0x40 |
#endif
@@ -574,7 +571,15 @@ void sendintro()
#ifdef __GNUC__
0x04 |
#endif
0);
0;
}
void sendintro()
{
packetbuf p(MAXTRANS, ENET_PACKET_FLAG_RELIABLE);
putint(p, SV_CONNECT);
putint(p, AC_VERSION);
putint(p, getbuildtype());
sendstring(player1->name, p);
sendstring(genpwdhash(player1->name, clientpassword, sessionid), p);
const char *lang = getalias("LANG");