Changed to a better validator

This commit is contained in:
verysecrethero
2016-03-10 16:09:54 +01:00
parent 0a94373f3f
commit 8b89df0095
3 changed files with 19 additions and 4 deletions
+1 -1
Submodule assets updated: 3af64d8b1f...007b54bd67
@@ -99,7 +99,7 @@
</c:Team> </c:Team>
<c:PlayerSpawn/> <c:PlayerSpawn/>
<c:Spawner> <c:Spawner>
<EntityFile>Schema/Entities/Player.xml</EntityFile> <EntityFile>Schema/Entities/PlayerRed.xml</EntityFile>
</c:Spawner> </c:Spawner>
<c:Transform/> <c:Transform/>
</Components> </Components>
@@ -225,6 +225,11 @@
</Team> </Team>
</c:Team> </c:Team>
<c:Trigger/> <c:Trigger/>
<c:Model>
<Resource></Resource>
<Color A="0.300000012" B="0" G="0" R="1"/>
<Visible>false</Visible>
</c:Model>
<c:Transform> <c:Transform>
<Position X="0" Y="0" Z="-4.10000038"/> <Position X="0" Y="0" Z="-4.10000038"/>
</c:Transform> </c:Transform>
@@ -239,7 +244,17 @@
<Scale X="2.70000005" Y="3.4000001" Z="4.60000038"/> <Scale X="2.70000005" Y="3.4000001" Z="4.60000038"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children/> <Children>
<Entity>
<Components>
<c:Model>
<Resource></Resource>
</c:Model>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity> </Entity>
<Entity name="Blue"> <Entity name="Blue">
<Components> <Components>
+1 -1
View File
@@ -108,7 +108,7 @@ void CapturePointSystem::UpdateComponent(EntityWrapper& capturePointEntity, Comp
//change what model is displaying (change all in case 2 capturepoints has been captured on the same frame) //change what model is displaying (change all in case 2 capturepoints has been captured on the same frame)
for (int i = 0; i < m_NumberOfCapturePoints; i++) { for (int i = 0; i < m_NumberOfCapturePoints; i++) {
auto owner = (int)m_CapturePointNumberToEntityMap[i]["Team"]["Team"]; auto owner = (int)m_CapturePointNumberToEntityMap[i]["Team"]["Team"];
if (m_CapturePointNumberToEntityMap[i].FirstChildByName("Red").ID != EntityID_Invalid) { if (m_CapturePointNumberToEntityMap[i].FirstChildByName("Red").Valid()) {
ChangeCapturePointModelsVisibility(m_CapturePointNumberToEntityMap[i].FirstChildByName("Red"), owner == redTeam); ChangeCapturePointModelsVisibility(m_CapturePointNumberToEntityMap[i].FirstChildByName("Red"), owner == redTeam);
ChangeCapturePointModelsVisibility(m_CapturePointNumberToEntityMap[i].FirstChildByName("Blue"), owner == blueTeam); ChangeCapturePointModelsVisibility(m_CapturePointNumberToEntityMap[i].FirstChildByName("Blue"), owner == blueTeam);
ChangeCapturePointModelsVisibility(m_CapturePointNumberToEntityMap[i].FirstChildByName("Spectator"), owner == spectatorTeam); ChangeCapturePointModelsVisibility(m_CapturePointNumberToEntityMap[i].FirstChildByName("Spectator"), owner == spectatorTeam);