Backport revert:

As by consensus, revert ticket:1990, and revisions:
r11331, r11310, r11305, r11206, r11202, r11200, r11199, r11112.

Please see ticket:2051 for more discussion on the new routine.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11381 4a71c877-e1ca-e34f-864e-861f7616d084
master
Buginator 2010-08-05 00:30:29 +00:00 committed by Git SVN Gateway
parent 0a4bd99cb5
commit 235579d051
4 changed files with 6 additions and 32 deletions

View File

@ -37,7 +37,7 @@ void closeConfig( void );
void setDefaultFrameRateLimit(void);
/// Default map for Skirmish
static const char DEFAULTSKIRMISHMAP[] = "Rush";
static const char DEFAULTSKIRMISHMAP[] = "Sk-Rush";
#ifdef __cplusplus
}

View File

@ -142,28 +142,17 @@ void lev_error(const char* msg)
LEVEL_DATASET* levFindDataSet(const char* name)
{
LEVEL_DATASET* psNewLevel;
LEVEL_DATASET* psCloseEnough = NULL;
for (psNewLevel = psLevels; psNewLevel; psNewLevel = psNewLevel->psNext)
{
if (psNewLevel->pName != NULL)
if (psNewLevel->pName != NULL
&& strcmp(psNewLevel->pName, name) == 0)
{
if ((strncmp(psNewLevel->pName, "Sk-", 3) == 0 &&
strcmp(psNewLevel->pName+3, name) == 0) ||
(strncmp(psNewLevel->pName, "Sk-", 3) == 0 &&
strcmp(psNewLevel->pName+strlen(name)+3, "-T1") == 0 &&
strncmp(psNewLevel->pName+3, name, strlen(name)) == 0))
{
return psNewLevel;
}
if (strcmp(psNewLevel->pName, name) == 0)
{
psCloseEnough = psNewLevel;
}
return psNewLevel;
}
}
return psCloseEnough;
return NULL;
}
// parse a level description data file

View File

@ -569,16 +569,6 @@ 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;

View File

@ -127,12 +127,7 @@ static BOOL checkGameWdg(const char *nm)
for (lev = psLevels; lev; lev = lev->psNext)
{
if (strcmp(lev->pName, nm) == 0 ||
(strncmp(lev->pName, "Sk-", 3) == 0 &&
strcmp(lev->pName+3, nm) == 0) ||
(strncmp(lev->pName, "Sk-", 3) == 0 &&
strcmp(lev->pName+strlen(nm)+3, "-T1") == 0 &&
strncmp(lev->pName+3, nm, strlen(nm)) == 0))
if (strcmp(lev->pName, nm) == 0)
{
return true;
}