plays notification on captured/lost point

This commit is contained in:
stiffly
2016-02-02 14:57:03 +01:00
parent 83281fdaf1
commit 88ad127d8d
2 changed files with 52 additions and 1 deletions
+51
View File
@@ -205,6 +205,57 @@
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:AABB/>
<c:CapturePoint>
<HomePointForTeam>
<Blue/>
</HomePointForTeam>
</c:CapturePoint>
<c:Model>
<Resource>Models\Core\UnitCube.mesh</Resource>
<Color A="1" B="1" G="0.200000003" R="0"/>
</c:Model>
<c:Team>
<Team>
<Blue/>
</Team>
</c:Team>
<c:Transform>
<Position X="0" Y="0.773066521" Z="-18.975975"/>
<Scale X="4.9000001" Y="0.600000024" Z="3.50000024"/>
</c:Transform>
<c:Trigger/>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:AABB/>
<c:CapturePoint>
<HomePointForTeam>
<Red/>
</HomePointForTeam>
<CapturePointNumber>1</CapturePointNumber>
</c:CapturePoint>
<c:Model>
<Resource>Models\Core\UnitCube.mesh</Resource>
<Color A="1" B="1" G="1" R="0"/>
</c:Model>
<c:Team>
<Team>
<Red/>
</Team>
</c:Team>
<c:Transform>
<Position X="0" Y="0.452868998" Z="18.5607414"/>
<Scale X="4.60000038" Y="0.900000036" Z="4.10000038"/>
</c:Transform>
<c:Trigger/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
+1 -1
View File
@@ -365,7 +365,7 @@ bool SoundSystem::OnInputCommand(const Events::InputCommand & e)
bool SoundSystem::OnCaptured(const Events::Captured & e)
{
int homeTeam = (int)m_World->GetComponent(e.CapturePointID, "CapturePoint")["HomePointForTeam"];
int homeTeam = (int)m_World->GetComponent(e.CapturePointID, "Team")["Team"];
int team = (int)m_World->GetComponent(m_LocalPlayer, "Team")["Team"];
Events::PlaySoundOnEntity ev;
if (team == homeTeam) {