Skip to content

Commit

Permalink
Fix moving target detection
Browse files Browse the repository at this point in the history
  • Loading branch information
MeridianOXC committed Jan 3, 2024
1 parent 653b347 commit da2fc00
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Geoscape/ConfirmDestinationState.cpp
Expand Up @@ -122,7 +122,7 @@ ConfirmDestinationState::ConfirmDestinationState(std::vector<Craft*> crafts, Tar
if (Options::oxceShowETAMode > 0 && _target)
{
MovingTarget* mt = dynamic_cast<MovingTarget*>(_target);
if (Options::oxceShowETAMode == 1 && mt)
if (Options::oxceShowETAMode == 1 && mt && mt->getSpeed() > 0)
{
// don't show ETA for moving targets (i.e. UFOs and crafts)
}
Expand Down
2 changes: 1 addition & 1 deletion src/Geoscape/GeoscapeCraftState.cpp
Expand Up @@ -265,7 +265,7 @@ GeoscapeCraftState::GeoscapeCraftState(Craft *craft, Globe *globe, Waypoint *way
if (Options::oxceShowETAMode > 0 && _craft->getDestination())
{
MovingTarget* mt = dynamic_cast<MovingTarget*>(_craft->getDestination());
if (Options::oxceShowETAMode == 1 && mt)
if (Options::oxceShowETAMode == 1 && mt && mt->getSpeed() > 0)
{
// don't show ETA for moving targets (i.e. UFOs and crafts)
}
Expand Down
2 changes: 1 addition & 1 deletion src/Geoscape/InterceptState.cpp
Expand Up @@ -284,7 +284,7 @@ InterceptState::InterceptState(Globe *globe, bool useCustomSound, Base *base, Ta
if (Options::oxceShowETAMode > 0 && xcraft->getDestination() && Options::oxceInterceptGuiMaintenanceTimeHidden > 0)
{
MovingTarget* mt = dynamic_cast<MovingTarget*>(xcraft->getDestination());
if (Options::oxceShowETAMode == 1 && mt)
if (Options::oxceShowETAMode == 1 && mt && mt->getSpeed() > 0)
{
// don't show ETA for moving targets (i.e. UFOs and crafts)
}
Expand Down

0 comments on commit da2fc00

Please sign in to comment.