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-861f7616d084master
parent
baa232a17c
commit
0cebae9c43
14
src/map.c
14
src/map.c
|
@ -221,12 +221,7 @@ enum
|
||||||
|
|
||||||
static BOOL mapLoadGroundTypes(void)
|
static BOOL mapLoadGroundTypes(void)
|
||||||
{
|
{
|
||||||
if (!tileset)
|
debug(LOG_TERRAIN, "tileset: %s", tileset);
|
||||||
{
|
|
||||||
debug(LOG_ERROR, "tileset not loaded");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
debug(LOG_WARNING, "tileset: %s", tileset);
|
|
||||||
// FIXME: Read these from a config file
|
// FIXME: Read these from a config file
|
||||||
if (strcmp(tileset, "texpages/tertilesc1hw") == 0)
|
if (strcmp(tileset, "texpages/tertilesc1hw") == 0)
|
||||||
{
|
{
|
||||||
|
@ -876,6 +871,13 @@ BOOL mapLoad(char *filename)
|
||||||
mapWidth = width;
|
mapWidth = width;
|
||||||
mapHeight = height;
|
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
|
// load the ground types
|
||||||
if (!mapLoadGroundTypes())
|
if (!mapLoadGroundTypes())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue