Get TerrainDef from terrain number
Moderator: GZDoom Developers
-
- Posts: 3886
- Joined: Fri Feb 08, 2008 9:15 am
- Preferred Pronouns: She/Her
- Operating System Version (Optional): (btw I use) Arch
- Graphics Processor: nVidia with Vulkan support
- Location: Vigo, Galicia
Get TerrainDef from terrain number
Currently the only way to get the terrain of some floor is to spawn an actor in the sector to check, and then call its GetFloorTerrain(). A more direct way would be much more desirable, especially if it's clearscope so it can be called from trace functions.
-
- Posts: 3886
- Joined: Fri Feb 08, 2008 9:15 am
- Preferred Pronouns: She/Her
- Operating System Version (Optional): (btw I use) Arch
- Graphics Processor: nVidia with Vulkan support
- Location: Vigo, Galicia
Re: Get TerrainDef from terrain number
Should be closed as added.
-
-
- Posts: 17368
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: Get TerrainDef from terrain number
@Marisa: Care to elaborate on how to do this, for others to see?
-
- Posts: 3886
- Joined: Fri Feb 08, 2008 9:15 am
- Preferred Pronouns: She/Her
- Operating System Version (Optional): (btw I use) Arch
- Graphics Processor: nVidia with Vulkan support
- Location: Vigo, Galicia
Re: Get TerrainDef from terrain number
This was an issue with sectors. So the function GetFloorTerrain was added which works in the same way as GetTerrain but returning the TerrainDef instead of an int (yeah, amazing naming, I know).
Doesn't seem like either function is clearscope, though.
Doesn't seem like either function is clearscope, though.