Skip to content

Commit d092224

Browse files
committed
move vindinade alarm sound back to server
1 parent 22f6045 commit d092224

3 files changed

Lines changed: 12 additions & 6 deletions

File tree

src/game/client/swarm/c_asw_grenade_vindicator.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ C_ASW_Grenade_Vindicator::C_ASW_Grenade_Vindicator()
1616
m_bDetonated = false;
1717
m_pSmokeTrail = NULL;
1818
m_vecDetonateOrigin = Vector( 0.0, 0.0, 0.0 );
19+
}
1920

20-
EmitSound( "ASWGrenade.Alarm" );
21+
void C_ASW_Grenade_Vindicator::Spawn()
22+
{
23+
CreateSmokeTrail();
2124
}
2225

2326
void C_ASW_Grenade_Vindicator::OnDataChanged(DataUpdateType_t updateType)
2427
{
25-
if ( updateType == DATA_UPDATE_CREATED )
26-
CreateSmokeTrail();
27-
2828
if ( updateType == DATA_UPDATE_DATATABLE_CHANGED )
2929
{
3030
if ( !m_bDetonated && m_vecDetonateOrigin != Vector( 0.0, 0.0, 0.0 ) )
@@ -51,7 +51,6 @@ void C_ASW_Grenade_Vindicator::Detonate()
5151
m_pSmokeTrail = NULL;
5252
}
5353

54-
StopSound( "ASWGrenade.Alarm" );
5554
EmitSound( "ASWGrenade.Incendiary" );
56-
DispatchParticleEffect( "vindicator_grenade", m_vecDetonateOrigin, GetLocalAngles() );
55+
DispatchParticleEffect( "vindicator_grenade", m_vecDetonateOrigin, vec3_angle );
5756
}

src/game/client/swarm/c_asw_grenade_vindicator.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class C_ASW_Grenade_Vindicator : public C_ASW_Rifle_Grenade
1212

1313
public:
1414
C_ASW_Grenade_Vindicator();
15+
virtual void Spawn();
1516
virtual void OnDataChanged(DataUpdateType_t updateType);
1617
virtual void Detonate();
1718
void CreateSmokeTrail();

src/game/server/swarm/asw_grenade_vindicator.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ void CASW_Grenade_Vindicator::Spawn( void )
109109
QAngle vecAngVelocity( random->RandomFloat ( -100, -500 ), 0, 0 );
110110
SetLocalAngularVelocity( vecAngVelocity );
111111

112+
if ( !m_bSilent )
113+
{
114+
EmitSound( "ASWGrenade.Alarm" ); // 3 second warning sound
115+
}
112116
SetFuseLength(asw_vindicator_grenade_fuse.GetFloat());
113117

114118
m_fEarliestTouchDetonationTime = GetEarliestTouchDetonationTime();
@@ -236,6 +240,8 @@ void CASW_Grenade_Vindicator::Detonate()
236240
{
237241
m_takedamage = DAMAGE_NO;
238242

243+
StopSound( "ASWGrenade.Alarm" );
244+
239245
m_vecDetonateOrigin = GetAbsOrigin();
240246

241247
CPASFilter filter( GetAbsOrigin() );

0 commit comments

Comments
 (0)