@@ -432,7 +432,7 @@ void ScriptExt::Mission_Gather_NearTheLeader(TeamClass* pTeam, int countdown)
432432 }
433433 else
434434 {
435- closeEnough = RulesClass::Instance->CloseEnough / Unsorted::LeptonsPerCell;
435+ closeEnough = RulesClass::Instance->CloseEnough / ( double ) Unsorted::LeptonsPerCell;
436436 }
437437
438438 // The leader should stay calm & be the group's center
@@ -470,7 +470,7 @@ void ScriptExt::Mission_Gather_NearTheLeader(TeamClass* pTeam, int countdown)
470470
471471 nUnits++;
472472
473- if ((pUnit->DistanceFrom (pLeaderUnit->GetCell ()) / Unsorted::LeptonsPerCell) > closeEnough)
473+ if ((pUnit->DistanceFrom (pLeaderUnit->GetCell ()) / ( double ) Unsorted::LeptonsPerCell) > closeEnough)
474474 {
475475 // Leader's location is too far from me. Regroup
476476 if (pUnit->Destination != pLeaderUnit)
@@ -677,7 +677,7 @@ void ScriptExt::SetCloseEnoughDistance(TeamClass* pTeam, double distance)
677677 pTeamData->CloseEnough = distance;
678678
679679 if (distance <= 0 )
680- pTeamData->CloseEnough = RulesClass::Instance->CloseEnough / Unsorted::LeptonsPerCell;
680+ pTeamData->CloseEnough = RulesClass::Instance->CloseEnough / ( double ) Unsorted::LeptonsPerCell;
681681
682682 // This action finished
683683 pTeam->StepCompleted = true ;
@@ -713,7 +713,7 @@ bool ScriptExt::MoveMissionEndStatus(TeamClass* pTeam, TechnoClass* pFocus, Foot
713713 if (!pFocus || mode < 0 || (mode != 2 && mode != 1 && !pLeader))
714714 return false ;
715715
716- double closeEnough = RulesClass::Instance->CloseEnough / Unsorted::LeptonsPerCell;
716+ double closeEnough = RulesClass::Instance->CloseEnough / ( double ) Unsorted::LeptonsPerCell;
717717 auto const pTeamData = TeamExt::ExtMap.Find (pTeam);
718718
719719 if (pTeamData->CloseEnough > 0 )
@@ -734,7 +734,7 @@ bool ScriptExt::MoveMissionEndStatus(TeamClass* pTeam, TechnoClass* pFocus, Foot
734734 if (mode == 2 )
735735 {
736736 // Default mode: all members in range
737- if ((pUnit->DistanceFrom (pFocus->GetCell ()) / Unsorted::LeptonsPerCell) > closeEnough)
737+ if ((pUnit->DistanceFrom (pFocus->GetCell ()) / ( double ) Unsorted::LeptonsPerCell) > closeEnough)
738738 {
739739 bForceNextAction = false ;
740740
@@ -758,7 +758,7 @@ bool ScriptExt::MoveMissionEndStatus(TeamClass* pTeam, TechnoClass* pFocus, Foot
758758 if (mode == 1 )
759759 {
760760 // Any member in range
761- if ((pUnit->DistanceFrom (pFocus->GetCell ()) / Unsorted::LeptonsPerCell) > closeEnough)
761+ if ((pUnit->DistanceFrom (pFocus->GetCell ()) / ( double ) Unsorted::LeptonsPerCell) > closeEnough)
762762 {
763763 if (pUnit->WhatAmI () == AbstractType::Aircraft && pUnit->Ammo > 0 )
764764 pUnit->QueueMission (Mission::Move, false );
@@ -782,7 +782,7 @@ bool ScriptExt::MoveMissionEndStatus(TeamClass* pTeam, TechnoClass* pFocus, Foot
782782 // All other cases: Team Leader mode in range
783783 if (pLeader)
784784 {
785- if ((pUnit->DistanceFrom (pFocus->GetCell ()) / Unsorted::LeptonsPerCell) > closeEnough)
785+ if ((pUnit->DistanceFrom (pFocus->GetCell ()) / ( double ) Unsorted::LeptonsPerCell) > closeEnough)
786786 {
787787 if (pUnit->WhatAmI () == AbstractType::Aircraft && pUnit->Ammo > 0 )
788788 pUnit->QueueMission (Mission::Move, false );
0 commit comments