compressed transfer of cfg files

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2472 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
ac_stef
2008-09-01 11:51:05 +00:00
parent 965be81eda
commit 63dc4c5f64
6 changed files with 97 additions and 44 deletions
+4 -3
View File
@@ -767,7 +767,8 @@ void receivefile(uchar *data, int len)
conoutf("received map \"%s\" from server, reloading..", &text);
int mapsize = getint(p);
int cfgsize = getint(p);
int size = mapsize + cfgsize;
int cfgsizegz = getint(p);
int size = mapsize + cfgsizegz;
if(p.remaining() < size)
{
p.forceoverread();
@@ -780,8 +781,8 @@ void receivefile(uchar *data, int len)
}
writemap(path(text), mapsize, &p.buf[p.len]);
p.len += mapsize;
writecfg(path(text), cfgsize, &p.buf[p.len]);
p.len += cfgsize;
writecfggz(path(text), cfgsize, cfgsizegz, &p.buf[p.len]);
p.len += cfgsizegz;
changemapserv(text, gamemode);
break;
}