Skip to content

Commit

Permalink
client: render: fixes related to video projection feature of env_dynl…
Browse files Browse the repository at this point in the history
…ight
  • Loading branch information
SNMetamorph committed Dec 14, 2024
1 parent af61651 commit a39f0fd
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions client/render/gl_movie.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,13 +214,22 @@ bool R_UpdateCinematicDynLight( int videoFileIndex, CDynLight *dlight )
cin->texture_set = true;
}

// running think here because we're usually thinking with audio, but dlight doesn't have audio
if( !cin->sound_set )
{
CIN_SET_PARM( cin->state,
AVI_ENTNUM, -1,
AVI_VOLUME, 0,
AVI_ATTN, ATTN_NORM,
AVI_PARM_LAST );
cin->sound_set = true;
}

if( !CIN_THINK( cin->state )); // probably should be moved to some kind of global manager that will tick each frame
// running think here because we're usually thinking with audio, but dlight doesn't have audio
// probably should be moved to some kind of global manager that will tick each frame
if( !CIN_THINK( cin->state ))
{
if( FBitSet( RI->currententity->curstate.iuser1, CF_LOOPED_MOVIE ))
CIN_SET_PARM( cin->state, AVI_REWIND, AVI_PARM_LAST );
else cin->finished = true;
// for now, video playback with dlights is always looped
CIN_SET_PARM( cin->state, AVI_REWIND, AVI_PARM_LAST );
}
}
return true;
Expand Down

0 comments on commit a39f0fd

Please sign in to comment.