- 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:
Christoph Oelckers 2022-04-27 21:31:29 +02:00
parent 9b0b44d83b
commit 643e5c87fd

View file

@ -645,11 +645,15 @@ static void ParseFloor (FScanner &sc)
return;
}
sc.MustGetString ();
if (sc.Compare("Null") || sc.Compare("None"))
{
TerrainTypes.Set(picnum.GetIndex(), 0xffff);
return;
}
terrain = P_FindTerrain (sc.String);
if (terrain == -1)
{
Printf ("Unknown terrain %s\n", sc.String);
terrain = 0;
}
TerrainTypes.Set(picnum.GetIndex(), terrain);
}
@ -704,7 +708,7 @@ int P_FindTerrain (FName name)
{
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++)
{
if (Terrains[i].Name == name)