fixed bug where clients would end up (attempting to) load a different map path than the server, if the map-name contained slashes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6290 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -3328,7 +3328,11 @@ void process(ENetPacket *packet, int sender, int chan)
|
||||
}
|
||||
int qmode = (mode >= GMODE_NUM ? mode - GMODE_NUM : mode);
|
||||
if(mode==GMODE_DEMO) vi->action = new demoplayaction(newstring(text));
|
||||
else vi->action = new mapaction(newstring(vi->text), qmode, sender, qmode!=mode);
|
||||
else
|
||||
{
|
||||
char *vmap = newstring(vi->text ? behindpath(vi->text) : "");
|
||||
vi->action = new mapaction(vmap, qmode, sender, qmode!=mode);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SA_KICK:
|
||||
|
||||
@@ -141,10 +141,10 @@ static const char * const maplocstr[] = { "not found", "temporary", "custom", "l
|
||||
|
||||
int findmappath(const char *mapname, char *filename)
|
||||
{
|
||||
if(!mapname[0]) return MAP_NOTFOUND;
|
||||
string tempname;
|
||||
if(!filename) filename = tempname;
|
||||
const char *name = behindpath(mapname);
|
||||
if(!mapname[0]) return MAP_NOTFOUND;
|
||||
formatstring(filename)(SERVERMAP_PATH_BUILTIN "%s.cgz", name);
|
||||
path(filename);
|
||||
int loc = MAP_NOTFOUND;
|
||||
|
||||
Reference in New Issue
Block a user