Fix SoTA draw game by Gyullo.
--HG-- branch : trunk
This commit is contained in:
+43
-41
@@ -244,51 +244,53 @@ void BattleGroundSA::Update(uint32 diff)
|
|||||||
TotalTime += diff;
|
TotalTime += diff;
|
||||||
|
|
||||||
if(status == BG_SA_WARMUP || status == BG_SA_SECOND_WARMUP)
|
if(status == BG_SA_WARMUP || status == BG_SA_SECOND_WARMUP)
|
||||||
{
|
{
|
||||||
if(TotalTime >= BG_SA_WARMUPLENGTH)
|
if(TotalTime >= BG_SA_WARMUPLENGTH)
|
||||||
{
|
{
|
||||||
TotalTime = 0;
|
TotalTime = 0;
|
||||||
ToggleTimer();
|
ToggleTimer();
|
||||||
status = (status == BG_SA_WARMUP) ? BG_SA_ROUND_ONE : BG_SA_ROUND_TWO;
|
status = (status == BG_SA_WARMUP) ? BG_SA_ROUND_ONE : BG_SA_ROUND_TWO;
|
||||||
}
|
}
|
||||||
if(TotalTime >= BG_SA_BOAT_START)
|
if(TotalTime >= BG_SA_BOAT_START)
|
||||||
StartShips();
|
StartShips();
|
||||||
return;
|
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
else if(status == BG_SA_ROUND_ONE)
|
else if(status == BG_SA_ROUND_ONE)
|
||||||
{
|
{
|
||||||
if(TotalTime >= BG_SA_ROUNDLENGTH)
|
if(TotalTime >= BG_SA_ROUNDLENGTH)
|
||||||
{
|
{
|
||||||
RoundScores[0].time = TotalTime;
|
RoundScores[0].time = TotalTime;
|
||||||
TotalTime = 0;
|
TotalTime = 0;
|
||||||
status = BG_SA_SECOND_WARMUP;
|
status = BG_SA_SECOND_WARMUP;
|
||||||
attackers = (attackers == TEAM_ALLIANCE) ? TEAM_HORDE : TEAM_ALLIANCE;
|
attackers = (attackers == TEAM_ALLIANCE) ? TEAM_HORDE : TEAM_ALLIANCE;
|
||||||
RoundScores[0].winner = attackers;
|
RoundScores[0].winner = attackers;
|
||||||
status = BG_SA_SECOND_WARMUP;
|
status = BG_SA_SECOND_WARMUP;
|
||||||
ToggleTimer();
|
ToggleTimer();
|
||||||
ResetObjs();
|
ResetObjs();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
else if(status == BG_SA_ROUND_TWO)
|
else if(status == BG_SA_ROUND_TWO)
|
||||||
{
|
{
|
||||||
if(TotalTime >= BG_SA_ROUNDLENGTH)
|
if(TotalTime >= BG_SA_ROUNDLENGTH)
|
||||||
{
|
{
|
||||||
RoundScores[1].time = TotalTime;
|
RoundScores[1].time = TotalTime;
|
||||||
RoundScores[1].winner = (attackers == TEAM_ALLIANCE) ? TEAM_HORDE : TEAM_ALLIANCE;
|
RoundScores[1].winner = (attackers == TEAM_ALLIANCE) ? TEAM_HORDE : TEAM_ALLIANCE;
|
||||||
|
|
||||||
if(RoundScores[0].time < RoundScores[1].time)
|
if (RoundScores[0].time == RoundScores[1].time)
|
||||||
EndBattleGround(RoundScores[0].winner == TEAM_ALLIANCE ? ALLIANCE : HORDE);
|
EndBattleGround(NULL);
|
||||||
else
|
else if(RoundScores[0].time < RoundScores[1].time)
|
||||||
EndBattleGround(RoundScores[1].winner == TEAM_ALLIANCE ? ALLIANCE : HORDE);
|
EndBattleGround(RoundScores[0].winner == TEAM_ALLIANCE ? ALLIANCE : HORDE);
|
||||||
|
else
|
||||||
return;
|
EndBattleGround(RoundScores[1].winner == TEAM_ALLIANCE ? ALLIANCE : HORDE);
|
||||||
}
|
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(status == BG_SA_ROUND_ONE || status == BG_SA_ROUND_TWO)
|
if(status == BG_SA_ROUND_ONE || status == BG_SA_ROUND_TWO)
|
||||||
SendTime();
|
SendTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleGroundSA::StartingEventCloseDoors()
|
void BattleGroundSA::StartingEventCloseDoors()
|
||||||
|
|||||||
Reference in New Issue
Block a user