Browse Source

Fix momentary_door sounds

hltopdown
Roman Chistokhodov 6 years ago committed by Alibek Omarov
parent
commit
60bb207ff4
  1. 9
      dlls/doors.cpp

9
dlls/doors.cpp

@ -926,6 +926,7 @@ public: @@ -926,6 +926,7 @@ public:
void Spawn( void );
void Precache( void );
void EXPORT MomentaryMoveDone( void );
void EXPORT StopMoveSound( void );
void KeyValue( KeyValueData *pkvd );
void Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value );
@ -1117,7 +1118,15 @@ void CMomentaryDoor::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYP @@ -1117,7 +1118,15 @@ void CMomentaryDoor::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYP
}
void CMomentaryDoor::MomentaryMoveDone( void )
{
SetThink(&CMomentaryDoor::StopMoveSound);
pev->nextthink = pev->ltime + 0.1;
}
void CMomentaryDoor::StopMoveSound()
{
STOP_SOUND( ENT( pev ), CHAN_STATIC, STRING( pev->noiseMoving ) );
EMIT_SOUND( ENT( pev ), CHAN_STATIC, STRING( pev->noiseArrived ), 1, ATTN_NORM );
pev->nextthink = -1;
ResetThink();
}

Loading…
Cancel
Save