diff options
Diffstat (limited to 'Stars45/StarshipTacticalAI.cpp')
-rw-r--r-- | Stars45/StarshipTacticalAI.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Stars45/StarshipTacticalAI.cpp b/Stars45/StarshipTacticalAI.cpp index 977b86b..e00e8d2 100644 --- a/Stars45/StarshipTacticalAI.cpp +++ b/Stars45/StarshipTacticalAI.cpp @@ -36,6 +36,12 @@ Starship-specific mid-level (tactical) AI */ +#ifndef NOMINMAX +#define NOMINMAX +#endif + +#include <algorithm> + #include "MemDebug.h" #include "StarshipTacticalAI.h" #include "ShipAI.h" @@ -128,7 +134,7 @@ StarshipTacticalAI::FindThreat() continue; if (c_ship && c_ship != ship) { - double basis = max(contact->Range(ship), CELL_SIZE); + double basis = std::max(contact->Range(ship), CELL_SIZE); double ai_value = c_ship->AIValue() / basis; if (c_ship->GetIFF() == ship->GetIFF()) { |