Skip to content

Commit a39f0fd

Browse files
committed
client: render: fixes related to video projection feature of env_dynlight
1 parent af61651 commit a39f0fd

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

client/render/gl_movie.cpp

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -214,13 +214,22 @@ bool R_UpdateCinematicDynLight( int videoFileIndex, CDynLight *dlight )
214214
cin->texture_set = true;
215215
}
216216

217-
// running think here because we're usually thinking with audio, but dlight doesn't have audio
217+
if( !cin->sound_set )
218+
{
219+
CIN_SET_PARM( cin->state,
220+
AVI_ENTNUM, -1,
221+
AVI_VOLUME, 0,
222+
AVI_ATTN, ATTN_NORM,
223+
AVI_PARM_LAST );
224+
cin->sound_set = true;
225+
}
218226

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

0 commit comments

Comments
 (0)