mirror of
https://bitbucket.org/CPMADevs/cnq3
synced 2024-11-10 06:31:48 +00:00
fixed RB_RenderLitSurfList still crashing because of an invalid stage index
the first attempt was f99c223495
this is really not a proper fix since I haven't solved how it gets to that stage
but, knowing I will be deleting this whole part of the code soon enough anyway...
This commit is contained in:
parent
928c9a71ec
commit
9895f3b895
1 changed files with 4 additions and 2 deletions
|
@ -419,13 +419,15 @@ static void RB_RenderLitSurfList( dlight_t* dl, qbool opaque )
|
|||
if (!opaque && shader->sort <= SS_OPAQUE)
|
||||
continue;
|
||||
|
||||
const int stageIndex = shader->lightingStages[ST_DIFFUSE];
|
||||
if (stageIndex < 0 || stageIndex >= shader->numStages)
|
||||
continue;
|
||||
|
||||
if (shaderPrev)
|
||||
RB_EndSurface();
|
||||
RB_BeginSurface( shader, fogNum );
|
||||
tess.greyscale = litSurf->greyscale;
|
||||
|
||||
// stage index is guaranteed valid by R_AddLitSurface
|
||||
const int stageIndex = shader->lightingStages[ST_DIFFUSE];
|
||||
const shaderStage_t* const stage = shader->stages[stageIndex];
|
||||
backEnd.dlIntensity = (shader->contentFlags & liquidFlags) != 0 ? 0.5f : 1.0f;
|
||||
backEnd.dlStateBits =
|
||||
|
|
Loading…
Reference in a new issue