When the tileset is not set, default to Arizona (this fixes the map preview).

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6715 4a71c877-e1ca-e34f-864e-861f7616d084
master
Gerard Krol 2009-02-23 12:00:17 +00:00
parent baa232a17c
commit 0cebae9c43
1 changed files with 8 additions and 6 deletions

View File

@ -221,12 +221,7 @@ enum
static BOOL mapLoadGroundTypes(void)
{
if (!tileset)
{
debug(LOG_ERROR, "tileset not loaded");
return false;
}
debug(LOG_WARNING, "tileset: %s", tileset);
debug(LOG_TERRAIN, "tileset: %s", tileset);
// FIXME: Read these from a config file
if (strcmp(tileset, "texpages/tertilesc1hw") == 0)
{
@ -876,6 +871,13 @@ BOOL mapLoad(char *filename)
mapWidth = width;
mapHeight = height;
// FIXME: the map preview code loads the map without setting the tileset
if (!tileset)
{
debug(LOG_WARNING, "tileset not loaded, using arizona (map preview?)");
tileset = strdup("texpages/tertilesc1hw");
}
// load the ground types
if (!mapLoadGroundTypes())
{