diff --git a/src/configuration.h b/src/configuration.h index 524f781bf..bf9efc4d2 100644 --- a/src/configuration.h +++ b/src/configuration.h @@ -37,7 +37,7 @@ void closeConfig( void ); void setDefaultFrameRateLimit(void); /// Default map for Skirmish -static const char DEFAULTSKIRMISHMAP[] = "Sk-Rush"; +static const char DEFAULTSKIRMISHMAP[] = "Rush"; #ifdef __cplusplus } diff --git a/src/levels.c b/src/levels.c index 30096c959..905d374f3 100644 --- a/src/levels.c +++ b/src/levels.c @@ -145,10 +145,17 @@ LEVEL_DATASET* levFindDataSet(const char* name) for (psNewLevel = psLevels; psNewLevel; psNewLevel = psNewLevel->psNext) { - if (psNewLevel->pName != NULL - && strcmp(psNewLevel->pName, name) == 0) + if (psNewLevel->pName != NULL) { - return psNewLevel; + if (strcmp(psNewLevel->pName, name) == 0 || + (strncmp(psNewLevel->pName, "Sk-", 3) == 0 && + strcmp(psNewLevel->pName+3, name) == 0) || + (strncmp(psNewLevel->pName, "Sk-", 3) == 0 && + strcmp(psNewLevel->pName+strlen(name)-3-3, "-T1") && + strncmp(psNewLevel->pName+3, name, strlen(name)-3) == 0)) + { + return psNewLevel; + } } } diff --git a/src/multimenu.c b/src/multimenu.c index 84bcbd30a..4f967d7ec 100644 --- a/src/multimenu.c +++ b/src/multimenu.c @@ -569,6 +569,16 @@ void addMultiRequest(const char* searchDir, const char* fileExtension, UDWORD mo sstrcpy(tips[tip_index], mapName); free(mapName); + // Chop off the "Sk-" if necessary + if (strncmp(tips[tip_index], "Sk-", 3) == 0) + { + memmove(tips[tip_index], tips[tip_index]+3, strlen(tips[tip_index]+3)+1); + } + if (strncmp(tips[tip_index]+strlen(tips[tip_index])-3, "-T1", 3)==0) + { + tips[tip_index][strlen(tips[tip_index])-3] = 0; + } + sButInit.pTip = tips[tip_index]; sButInit.pText = tips[tip_index]; sButInit.UserData = players;