From bd6814b6231bb2a0ea8530c592b63ac3de1dc4db Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Tue, 26 Jun 2007 18:48:27 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1158 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/client.cpp | 3 +-- source/src/clients2c.cpp | 5 +++++ source/src/protos.h | 1 + source/src/worldio.cpp | 1 - 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/source/src/client.cpp b/source/src/client.cpp index f04bb817..e179f6f5 100644 --- a/source/src/client.cpp +++ b/source/src/client.cpp @@ -427,7 +427,7 @@ void sendmap(char *mapname) save_world(mapname); changemap(mapname); } - mapname = getclientmap(); + else mapname = getclientmap(); if(securemapcheck(mapname)) return; int mapsize; uchar *mapdata = readmap(mapname, &mapsize); @@ -455,7 +455,6 @@ void sendmap(char *mapname) void getmap() { - if(securemapcheck(getclientmap())) return; ENetPacket *packet = enet_packet_create(NULL, MAXTRANS, ENET_PACKET_FLAG_RELIABLE); ucharbuf p(packet->data, packet->dataLength); putint(p, SV_RECVMAP); diff --git a/source/src/clients2c.cpp b/source/src/clients2c.cpp index 92e51e79..d8b5e630 100644 --- a/source/src/clients2c.cpp +++ b/source/src/clients2c.cpp @@ -435,6 +435,11 @@ void parsemessages(int cn, playerent *d, ucharbuf &p) p.forceoverread(); break; } + if(securemapcheck(text)) + { + p.len += mapsize; + break; + } writemap(text, mapsize, &p.buf[p.len]); p.len += mapsize; changemapserv(text, gamemode); diff --git a/source/src/protos.h b/source/src/protos.h index 0c784f8e..4780e7d3 100644 --- a/source/src/protos.h +++ b/source/src/protos.h @@ -119,6 +119,7 @@ extern int getclientnum(); extern void changemapserv(char *name, int mode); extern void changeteam(int team); extern void newteam(char *name); +extern bool securemapcheck(char *map); extern bool sendpwd; // clientgame diff --git a/source/src/worldio.cpp b/source/src/worldio.cpp index 2b11b6b8..98f1a191 100644 --- a/source/src/worldio.cpp +++ b/source/src/worldio.cpp @@ -128,7 +128,6 @@ uchar *readmap(char *mname, int *msize) void save_world(char *mname) { if(!*mname) mname = getclientmap(); - extern bool securemapcheck(char *map); if(securemapcheck(mname)) return; voptimize(); toptimize();