-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Labels
ToolsThe request relates to the modding and development tools.The request relates to the modding and development tools.
Description
Description
Due to the fact that vbsp holds texinfo references as short-sized indexes into a global array, >32767 intermediary texinfos cause memory corruption in the CompactTexinfos routine. The fix is rather simple: just set the fields to be unsigned short. Structures and fields affected:
dface_t::texinfo->unsigned shortdbrushside_t::texinfo->unsigned shortdoverlay_t::nTexInfo->unsigned shortdleafwaterdata_t::surfaceTexInfoID->unsigned shortdworldlight_t::texinfo: no change, the type isintalreadydwateroverlay_t::nTexInfo->unsigned short
I've made a patch doing exactly that (just in the CompactTexinfos routine, as its the only place where that even gets used) to fix a map compilation error, and it just works fine. Doesn't break bsp compatibility either, as it does not change any structure sizes.
This, by the way, was the cause for corrupted texinfos in maps, as, i can see, you have rolled out a fix for that.
Pendred, Battlefieldkille, b0ls, KrzOkun and JokerR3310Pendred
Metadata
Metadata
Assignees
Labels
ToolsThe request relates to the modding and development tools.The request relates to the modding and development tools.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity