Server now does Capture point logic too.

This commit is contained in:
stiffly
2016-02-22 11:30:31 +01:00
parent 23dc8e07b2
commit 4c1a284636
2 changed files with 8 additions and 7 deletions
+5 -5
View File
@@ -6,20 +6,20 @@ CapturePointSystem::CapturePointSystem(SystemParams params)
, PureSystem("CapturePoint")
{
//subscribe/listenTo playerdamage,healthpickup events (using the eventBroker)
if (IsClient) {
//if (IsClient) {
EVENT_SUBSCRIBE_MEMBER(m_ETriggerTouch, &CapturePointSystem::OnTriggerTouch);
EVENT_SUBSCRIBE_MEMBER(m_ETriggerLeave, &CapturePointSystem::OnTriggerLeave);
EVENT_SUBSCRIBE_MEMBER(m_ECaptured, &CapturePointSystem::OnCaptured);
}
//}
}
//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(EntityWrapper& capturePointEntity, ComponentWrapper& cCapturePoint, double dt)
{
if (!IsClient) {
return;
}
//if (!IsClient) {
// return;
//}
if (m_WinnerWasFound) {
return;