fixed missing cast found by Coverity CID 1232665

This commit is contained in:
titiger 2014-12-16 01:50:12 +01:00
parent c51817d8d5
commit 2d4c4ece8a
1 changed files with 1 additions and 1 deletions

View File

@ -687,7 +687,7 @@ void Commander::giveNetworkCommand(NetworkCommand* networkCommand) const {
// If > 50% of team vote yes, switch th eplayers team
if(newTeamTotalMemberCount > 0 && newTeamVotedYes > 0 &&
newTeamVotedYes / newTeamTotalMemberCount > 0.5) {
static_cast<float>(newTeamVotedYes) / static_cast<float>(newTeamTotalMemberCount) > 0.5) {
Faction *faction = world->getFaction(factionIndex);
int oldTeam = faction->getTeam();
faction->setTeam(vote->newTeam);