File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 22
22
#include " ThrownDevice.h"
23
23
#include " MOPixel.h"
24
24
#include " Actor.h"
25
+ #include " Scene.h"
25
26
26
27
namespace RTE {
27
28
@@ -1062,7 +1063,12 @@ void HDFirearm::Update()
1062
1063
if (m_FireSound && !(m_FireSound->GetLoopSetting () == -1 && m_FireSound->IsBeingPlayed ())) {
1063
1064
m_FireSound->Play (m_Pos);
1064
1065
}
1065
- if (m_FireEchoSound) { m_FireEchoSound->Play (m_Pos); }
1066
+ if (m_FireEchoSound) {
1067
+ Scene::Area* noEchoArea = g_SceneMan.GetScene ()->GetOptionalArea (" IndoorArea" );
1068
+ if (noEchoArea == nullptr || !noEchoArea->IsInside (m_Pos)) {
1069
+ m_FireEchoSound->Play (m_Pos);
1070
+ }
1071
+ }
1066
1072
}
1067
1073
1068
1074
if (m_Loudness > 0 ) { g_MovableMan.RegisterAlarmEvent (AlarmEvent (m_Pos, m_Team, m_Loudness)); }
You can’t perform that action at this time.
0 commit comments