mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-13 07:57:52 +00:00
- added an option to delete a terrain type from a texture.
Just define a texture's terrain to 'none'. (A bit puzzling that such a feature did not exist yet...)
This commit is contained in:
parent
9b0b44d83b
commit
643e5c87fd
1 changed files with 6 additions and 2 deletions
|
@ -645,11 +645,15 @@ static void ParseFloor (FScanner &sc)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
sc.MustGetString ();
|
sc.MustGetString ();
|
||||||
|
if (sc.Compare("Null") || sc.Compare("None"))
|
||||||
|
{
|
||||||
|
TerrainTypes.Set(picnum.GetIndex(), 0xffff);
|
||||||
|
return;
|
||||||
|
}
|
||||||
terrain = P_FindTerrain (sc.String);
|
terrain = P_FindTerrain (sc.String);
|
||||||
if (terrain == -1)
|
if (terrain == -1)
|
||||||
{
|
{
|
||||||
Printf ("Unknown terrain %s\n", sc.String);
|
Printf ("Unknown terrain %s\n", sc.String);
|
||||||
terrain = 0;
|
|
||||||
}
|
}
|
||||||
TerrainTypes.Set(picnum.GetIndex(), terrain);
|
TerrainTypes.Set(picnum.GetIndex(), terrain);
|
||||||
}
|
}
|
||||||
|
@ -704,7 +708,7 @@ int P_FindTerrain (FName name)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
if (name == NAME_Null) return -1;
|
if (name == NAME_Null || name == NAME_None) return -1;
|
||||||
for (i = 0; i < Terrains.Size (); i++)
|
for (i = 0; i < Terrains.Size (); i++)
|
||||||
{
|
{
|
||||||
if (Terrains[i].Name == name)
|
if (Terrains[i].Name == name)
|
||||||
|
|
Loading…
Reference in a new issue