Several changes/fixes based on the latest broken refactoring.

Fixed Simon's mistake in CapturePointLogic. William fixed so TriggerSystem works again with CapturePoints.
This commit is contained in:
verysecrethero
2016-02-02 11:37:22 +01:00
parent 7408da401b
commit 42b52a6766
9 changed files with 205 additions and 10 deletions
+2 -1
View File
@@ -66,7 +66,7 @@ void CapturePointSystem::UpdateComponent(EntityWrapper& capturePointEntity, Comp
nextPossibleCapturePoint["Blue"] = -1;
for (size_t i = 0; i < m_NumberOfCapturePoints; i++)
{
if (m_CapturePointNumberToEntityMap[i].HasComponent("Team")) {
if (!m_CapturePointNumberToEntityMap[i].HasComponent("Team")) {
continue;
}
ComponentWrapper& capturePointOwnedBy = m_CapturePointNumberToEntityMap[i]["Team"];
@@ -119,6 +119,7 @@ void CapturePointSystem::UpdateComponent(EntityWrapper& capturePointEntity, Comp
if (std::get<1>(triggerTouched) == capturePointEntity) {
//some player has touched this - lets figure out: what team, health
EntityWrapper player = std::get<0>(triggerTouched);
//check if its really a player that has triggered the touch
if (!player.HasComponent("Player")) {
//if a non-player has entered the capturePoint, just erase that event and continue
m_ETriggerTouchVector.erase(m_ETriggerTouchVector.begin() + i - 1);