|
|
|
@ -571,7 +571,8 @@ void CBaseDoor::DoorGoUp( void )
@@ -571,7 +571,8 @@ void CBaseDoor::DoorGoUp( void )
|
|
|
|
|
// emit door moving and stop sounds on CHAN_STATIC so that the multicast doesn't
|
|
|
|
|
// filter them out and leave a client stuck with looping door sounds!
|
|
|
|
|
if ( !FBitSet( pev->spawnflags, SF_DOOR_SILENT ) ) |
|
|
|
|
EMIT_SOUND(ENT(pev), CHAN_STATIC, (char*)STRING(pev->noiseMoving), 1, ATTN_NORM); |
|
|
|
|
if ( m_toggle_state != TS_GOING_UP && m_toggle_state != TS_GOING_DOWN ) |
|
|
|
|
EMIT_SOUND(ENT(pev), CHAN_STATIC, (char*)STRING(pev->noiseMoving), 1, ATTN_NORM); |
|
|
|
|
|
|
|
|
|
m_toggle_state = TS_GOING_UP; |
|
|
|
|
|
|
|
|
@ -652,7 +653,8 @@ void CBaseDoor::DoorHitTop( void )
@@ -652,7 +653,8 @@ void CBaseDoor::DoorHitTop( void )
|
|
|
|
|
void CBaseDoor::DoorGoDown( void ) |
|
|
|
|
{ |
|
|
|
|
if ( !FBitSet( pev->spawnflags, SF_DOOR_SILENT ) ) |
|
|
|
|
EMIT_SOUND(ENT(pev), CHAN_STATIC, (char*)STRING(pev->noiseMoving), 1, ATTN_NORM); |
|
|
|
|
if ( m_toggle_state != TS_GOING_UP && m_toggle_state != TS_GOING_DOWN ) |
|
|
|
|
EMIT_SOUND(ENT(pev), CHAN_STATIC, (char*)STRING(pev->noiseMoving), 1, ATTN_NORM); |
|
|
|
|
|
|
|
|
|
#ifdef DOOR_ASSERT |
|
|
|
|
ASSERT(m_toggle_state == TS_AT_TOP); |
|
|
|
@ -753,6 +755,9 @@ void CBaseDoor::Blocked( CBaseEntity *pOther )
@@ -753,6 +755,9 @@ void CBaseDoor::Blocked( CBaseEntity *pOther )
|
|
|
|
|
pDoor->pev->avelocity = g_vecZero; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if ( !FBitSet( pev->spawnflags, SF_DOOR_SILENT ) ) |
|
|
|
|
STOP_SOUND(ENT(pev), CHAN_STATIC, (char*)STRING(pev->noiseMoving) ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ( pDoor->m_toggle_state == TS_GOING_DOWN) |
|
|
|
|
pDoor->DoorGoUp(); |
|
|
|
@ -1054,6 +1059,9 @@ void CMomentaryDoor::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYP
@@ -1054,6 +1059,9 @@ void CMomentaryDoor::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYP
|
|
|
|
|
|
|
|
|
|
if ( value > 1.0 ) |
|
|
|
|
value = 1.0; |
|
|
|
|
if ( value < 0.0 ) |
|
|
|
|
value = 0.0; |
|
|
|
|
|
|
|
|
|
Vector move = m_vecPosition1 + (value * (m_vecPosition2 - m_vecPosition1)); |
|
|
|
|
|
|
|
|
|
Vector delta = move - pev->origin; |
|
|
|
|