*** empty log message ***

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1059 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2007-06-01 15:48:55 +00:00
parent e166318c5e
commit 20252c19fd
15 changed files with 90 additions and 50 deletions
+2 -18
View File
@@ -397,20 +397,6 @@ void gets2c() // get updates from the server
// sendmap/getmap commands, should be replaced by more intuitive map downloading
cvector securemaps;
void clearsecuremaps() { securemaps.deletecontentsa(); }
void securemap(char *map) { if(map) securemaps.add(newstring(map)); }
bool securemapcheck(char *map)
{
loopv(securemaps) if(!strcmp(securemaps[i], map))
{
conoutf("\f3map %s is secured, you can not send or overwrite it", map);
return true;
}
return false;
}
void sendmap(char *mapname)
{
if(*mapname)
@@ -419,7 +405,7 @@ void sendmap(char *mapname)
changemap(mapname);
}
mapname = getclientmap();
if(securemapcheck(mapname)) return;
if(mapinfo.access(mapname)) return;
int mapsize;
uchar *mapdata = readmap(mapname, &mapsize);
if(!mapdata) return;
@@ -446,7 +432,7 @@ void sendmap(char *mapname)
void getmap()
{
if(securemapcheck(getclientmap())) return;
if(mapinfo.access(getclientmap())) return;
ENetPacket *packet = enet_packet_create(NULL, MAXTRANS, ENET_PACKET_FLAG_RELIABLE);
ucharbuf p(packet->data, packet->dataLength);
putint(p, SV_RECVMAP);
@@ -457,5 +443,3 @@ void getmap()
COMMAND(sendmap, ARG_1STR);
COMMAND(getmap, ARG_NONE);
COMMAND(clearsecuremaps, ARG_NONE);
COMMAND(securemap, ARG_1STR);