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
+1 -1
View File
@@ -29,7 +29,7 @@ private:
EventRelay<CapturePointSystem, Events::TriggerLeave> m_ETriggerLeave;
bool CapturePointSystem::OnTriggerLeave(const Events::TriggerLeave& e);
bool WinnerWasFound = false;
bool m_WinnerWasFound = false;
//need to track these variables for the captureSystem to work as per design!
const int m_NotACapturePoint = 999;
int m_Team1NextPossibleCapturePoint = m_NotACapturePoint;
+1
View File
@@ -21,6 +21,7 @@ set(SOURCE_FILES
"Game.cpp"
"HealthSystem.cpp"
"PlayerSystem.cpp"
"CapturePointSystem.cpp"
)
set(LIBRARIES
+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;
}
}