Add support for Insurgency mapcycle format (bug 5966, r=asherkin).
Add support for Insurgency mapcycle format (
bug 5966, r=asherkin).
1.1 --- a/core/logic/smn_maplists.cpp Tue Jan 07 10:24:05 2014 -0500
1.2 +++ b/core/logic/smn_maplists.cpp Tue Jan 07 10:24:44 2014 -0500
1.3 @@ -523,10 +523,28 @@
1.4 {
1.5 continue;
1.6 }
1.7 +
1.8 + if (strcmp(smcore.GetSourceEngineName(), "insurgency") == 0)
1.9 + {
1.10 + // Insurgency (presumably?) doesn't allow spaces in map names
1.11 + // and does use a space to delimit the map name from the map mode
1.12 + int i = 0;
1.13 + while (ptr[i] != 0)
1.14 + {
1.15 + if (ptr[i] == ' ')
1.16 + {
1.17 + ptr[i] = 0;
1.18 + break;
1.19 + }
1.20 + ++i;
1.21 + }
1.22 + }
1.23 +
1.24 if (!gamehelpers->IsMapValid(ptr))
1.25 {
1.26 continue;
1.27 }
1.28 +
1.29 if ((blk = pMapList->pArray->push()) != NULL)
1.30 {
1.31 smcore.strncopy((char *)blk, ptr, 255);