Get TerrainDef from terrain number

Moderator: GZDoom Developers

User avatar
Marisa the Magician
 
 
Posts: 3853
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia

Get TerrainDef from terrain number

Post by Marisa the Magician »

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.
User avatar
Marisa the Magician
 
 
Posts: 3853
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia

Re: Get TerrainDef from terrain number

Post by Marisa the Magician »

Should be closed as added.
User avatar
Nash
 
 
Posts: 17326
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Get TerrainDef from terrain number

Post by Nash »

@Marisa: Care to elaborate on how to do this, for others to see?
User avatar
Marisa the Magician
 
 
Posts: 3853
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia

Re: Get TerrainDef from terrain number

Post by Marisa the Magician »

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.

Return to “Closed Feature Suggestions [GZDoom]”