Get TerrainDef from terrain number

Moderator: GZDoom Developers

Post Reply
User avatar
Marisa the Magician
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
Contact:

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: 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
Contact:

Re: Get TerrainDef from terrain number

Post by Marisa the Magician »

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

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: 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
Contact:

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.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”