Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix crash due to MST_FLARE usage
  • Loading branch information
VReaperV committed Mar 2, 2025
commit e40b87425128d78340912f328577d3afebef9a87
6 changes: 6 additions & 0 deletions src/engine/renderer/tr_bsp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3440,6 +3440,12 @@ static void R_LoadSurfaces( lump_t *surfs, lump_t *verts, lump_t *indexLump )
case mapSurfaceType_t::MST_FLARE:
Log::Warn( "Surface type not supported: MST_FLARE; firstIndex: %i, numIndexes: %i, shaderNum: %i",
in->firstIndex, in->numIndexes, in->shaderNum );

// We still have to set these because other code will be checking them
out->data = ( surfaceType_t* ) ri.Hunk_Alloc( sizeof( surfaceType_t ), ha_pref::h_low );
*out->data = surfaceType_t::SF_BAD;
out->shader = tr.defaultShader;

numFlares++;
break;

Expand Down