mirror of
https://github.com/glest/glest-source.git
synced 2025-08-24 17:02:49 +02:00
fixed missing cast found by Coverity CID 1232665
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user