*Fix bugged opvp update timer.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-06-06 14:29:06 -05:00
parent eb9d89e5ce
commit 16d44db8f7
4 changed files with 17 additions and 17 deletions
+7 -7
View File
@@ -247,7 +247,7 @@ bool OPvPCapturePoint::Update(uint32 diff)
}
// get the difference of numbers
float fact_diff = (float)m_activePlayers[0].size() - (float)m_activePlayers[1].size();
float fact_diff = ((float)m_activePlayers[0].size() - (float)m_activePlayers[1].size()) * diff / OUTDOORPVP_OBJECTIVE_UPDATE_INTERVAL;
if(!fact_diff)
return false;
@@ -259,8 +259,8 @@ bool OPvPCapturePoint::Update(uint32 diff)
if(m_State == OBJECTIVESTATE_HORDE && m_ShiftPhase <= -m_ShiftMaxPhase)
return false;
if(fact_diff < - m_ShiftMaxCaptureSpeed)
fact_diff = - m_ShiftMaxCaptureSpeed;
if(fact_diff < -m_ShiftMaxCaptureSpeed)
fact_diff = -m_ShiftMaxCaptureSpeed;
Challenger = HORDE;
}
@@ -283,16 +283,16 @@ bool OPvPCapturePoint::Update(uint32 diff)
m_ShiftPhase += fact_diff;
// check limits, these are over the grey part
if(m_ShiftPhase <= -m_ShiftMaxPhase * (float)(m_NeutralValue) / 100.0f)
if(m_ShiftPhase < -m_ShiftMaxPhase * (float)(m_NeutralValue) / 100.0f)
{
if(m_ShiftPhase <= -m_ShiftMaxPhase)
if(m_ShiftPhase < -m_ShiftMaxPhase)
m_ShiftPhase = -m_ShiftMaxPhase;
m_State = OBJECTIVESTATE_HORDE;
return true;
}
else if(m_ShiftPhase >= m_ShiftMaxPhase * (float)(m_NeutralValue) / 100.0f)
else if(m_ShiftPhase > m_ShiftMaxPhase * (float)(m_NeutralValue) / 100.0f)
{
if(m_ShiftPhase >= m_ShiftMaxPhase)
if(m_ShiftPhase > m_ShiftMaxPhase)
m_ShiftPhase = m_ShiftMaxPhase;
m_State = OBJECTIVESTATE_ALLIANCE;
return true;