summaryrefslogtreecommitdiffhomepage
path: root/Stars45/Drive.cpp
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2021-10-03 16:51:12 +0200
committerAki <please@ignore.pl>2021-10-03 16:51:12 +0200
commit104248aabf40b692231fccd1adf1a2a494f1589a (patch)
tree5eee42a18a9688b03b483aff5c2bedffb4fe8a6c /Stars45/Drive.cpp
parentddd76aa4e1571c8d5965709db5c3cd47a89c9a38 (diff)
parentd2f333bf998691760b8970c2784756d0fa81e820 (diff)
downloadstarshatter-104248aabf40b692231fccd1adf1a2a494f1589a.zip
starshatter-104248aabf40b692231fccd1adf1a2a494f1589a.tar.gz
starshatter-104248aabf40b692231fccd1adf1a2a494f1589a.tar.bz2
Stars45 can now be built under MSYS2/Mingw32
Diffstat (limited to 'Stars45/Drive.cpp')
-rw-r--r--Stars45/Drive.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Stars45/Drive.cpp b/Stars45/Drive.cpp
index 8cf6dd0..570721d 100644
--- a/Stars45/Drive.cpp
+++ b/Stars45/Drive.cpp
@@ -36,6 +36,10 @@
Weapon class
*/
+#define NOMINMAX
+
+#include <algorithm>
+
#include "MemDebug.h"
#include "Drive.h"
#include "Power.h"
@@ -355,7 +359,7 @@ Drive::GetRequest(double seconds) const
{
if (!power_on) return 0;
- double t_factor = max(throttle + 0.5 * augmenter_throttle, 0.3);
+ double t_factor = std::max(throttle + 0.5 * augmenter_throttle, 0.3);
return t_factor * power_level * sink_rate * seconds;
}