Add support for Insurgency mapcycle format (bug 5966, r=asherkin).

--HG--
extra : rebase_source : 3ae48e176177b1816351cc0cdd5c8dd35e630ea3
This commit is contained in:
Nicholas Hastings 2014-01-07 10:24:44 -05:00
parent 17212616d7
commit 121c3973d6

View File

@ -523,10 +523,28 @@ private:
{
continue;
}
if (strcmp(smcore.GetSourceEngineName(), "insurgency") == 0)
{
// Insurgency (presumably?) doesn't allow spaces in map names
// and does use a space to delimit the map name from the map mode
int i = 0;
while (ptr[i] != 0)
{
if (ptr[i] == ' ')
{
ptr[i] = 0;
break;
}
++i;
}
}
if (!gamehelpers->IsMapValid(ptr))
{
continue;
}
if ((blk = pMapList->pArray->push()) != NULL)
{
smcore.strncopy((char *)blk, ptr, 255);