Core/Refactor: Fix alot of Possible loss of fraction warnings
This commit is contained in:
@@ -1174,7 +1174,7 @@ namespace Game.BattleFields
|
||||
}
|
||||
|
||||
// get the difference of numbers
|
||||
float fact_diff = (m_activePlayers[TeamId.Alliance].Count - m_activePlayers[TeamId.Horde].Count) * diff / 1000;
|
||||
float fact_diff = ((float)m_activePlayers[TeamId.Alliance].Count - m_activePlayers[TeamId.Horde].Count) * diff / 1000;
|
||||
if (MathFunctions.fuzzyEq(fact_diff, 0.0f))
|
||||
return false;
|
||||
|
||||
|
||||
@@ -930,9 +930,9 @@ namespace Game.BattleFields
|
||||
if (alliancePlayers != 0 && hordePlayers != 0)
|
||||
{
|
||||
if (alliancePlayers < hordePlayers)
|
||||
newStack = (int)(((float)(hordePlayers / alliancePlayers) - 1) * 4); // positive, should cast on alliance
|
||||
newStack = (int)((((float)hordePlayers / alliancePlayers) - 1) * 4); // positive, should cast on alliance
|
||||
else if (alliancePlayers > hordePlayers)
|
||||
newStack = (int)((1 - (float)(alliancePlayers / hordePlayers)) * 4); // negative, should cast on horde
|
||||
newStack = (int)((1 - ((float)alliancePlayers / hordePlayers)) * 4); // negative, should cast on horde
|
||||
}
|
||||
|
||||
if (newStack == m_tenacityStack)
|
||||
|
||||
Reference in New Issue
Block a user