Fixed a few CodeStandard mistakes. Added CapturePointSystem to CMakeLists.txt since branch is no longer based on ShootEvent-branch

This commit is contained in:
verysecrethero
2016-01-13 16:13:57 +01:00
parent ed5ac2e923
commit 9533920684
3 changed files with 5 additions and 4 deletions
+3 -3
View File
@@ -11,7 +11,7 @@ CapturePointSystem::CapturePointSystem(EventBroker* eventBroker)
//here all capturepoints will update their component
//NOTE: needs to run each frame, since we're possibly modifying the captureTimer for the capturePoints by dt
void CapturePointSystem::UpdateComponent(World *world, ComponentWrapper &capturePoint, double dt)
void CapturePointSystem::UpdateComponent(World* world, ComponentWrapper& capturePoint, double dt)
{
//for testing only:
//dt = 20.0;
@@ -140,13 +140,13 @@ void CapturePointSystem::UpdateComponent(World *world, ComponentWrapper &capture
}
//WIN: check for possible winCondition = check if the homebase is owned by the other team
if (!WinnerWasFound && (int)capturePoint["OwnedBy"] != 0 && (int)capturePoint["IsHomeCapturePointForTeamNumber"] != 0 &&
if (!m_WinnerWasFound && (int)capturePoint["OwnedBy"] != 0 && (int)capturePoint["IsHomeCapturePointForTeamNumber"] != 0 &&
(int)capturePoint["IsHomeCapturePointForTeamNumber"] != (int)capturePoint["OwnedBy"]) {
//publish Win event
Events::Win e;
e.TeamThatWon = capturePoint["OwnedBy"];
m_EventBroker->Publish(e);
WinnerWasFound = true;
m_WinnerWasFound = true;
}
}