trigger_camera: Support for 'wait' to be -1.
This commit is contained in:
parent
cc240fefb2
commit
8b013035e3
2 changed files with 8 additions and 2 deletions
|
@ -259,7 +259,7 @@ CSQC_UpdateView(float w, float h, float focus)
|
|||
|
||||
addentities(MASK_ENGINE);
|
||||
|
||||
if (pSeat->m_flCameraTime > time) {
|
||||
if (pSeat->m_flCameraTime > time || pSeat->m_flCameraTime == -1) {
|
||||
view_angles = pSeat->m_vecCameraAngle;
|
||||
setproperty(VF_ORIGIN, pSeat->m_vecCameraOrigin);
|
||||
setproperty(VF_CL_VIEWANGLES, view_angles);
|
||||
|
|
|
@ -82,7 +82,13 @@ trigger_camera::ReceiveEntity(float flFlags)
|
|||
pSeat->m_vecCameraAngle = angles;
|
||||
|
||||
if (flFlags & OCAMFL_CHANGED_WAIT) {
|
||||
pSeat->m_flCameraTime = time + readfloat();
|
||||
float flWait = readfloat();
|
||||
|
||||
if (flWait == -1)
|
||||
pSeat->m_flCameraTime = -1;
|
||||
else
|
||||
pSeat->m_flCameraTime = time + flWait;
|
||||
|
||||
setproperty(VF_CL_VIEWANGLES, angles);
|
||||
setproperty(VF_ANGLES, angles);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue