Facepunch / garrysmod-requests

Feature requests for Garry's Mod
84 stars 24 forks source link

Ability to get portions of BSP data in Lua Table form #1147

Open WinterPhoenix opened 6 years ago

WinterPhoenix commented 6 years ago

Specifically, I'm advocating for being able to get Lump data from a BSP; such as a table of all the vertexes (LUMP_VERTEXES), Texture Data (LUMP_TEXDATA), Texture Info (LUMP_TEXINFO), or other lumps, using a simple function call.

Something like this, would be ideal:

local vertsTbl = util.GetMapLumpData("filename.bsp", LUMP_VERTEXES)

Or maybe better yet:

local mapTbl = util.GetMapData("filename.bsp")
local headerTbl = mapTbl.Header
local vertsTbl = mapTbl.Lumps[LUMP_VERTEXES]

Thank you for your consideration!

neico commented 6 years ago

Getting and setting "game" lump data might also yield some interesting results.

meepen commented 6 years ago

getting and setting map lump stuff might actually yield a portal to be created normally, however I doubt the current engine could handle a lot of hot-updates like this.