aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-11-28 21:50:14 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-11-29 19:13:57 +0200
commitfe64f2b673d985d2842991014af0ba085eaf27db (patch)
tree4c210a39b0fc0b5ee8660e37150d5a58148cddb3
parenta91eb362777152b21dcd2c49788c1b5714f8792e (diff)
downloadminetest-fe64f2b673d985d2842991014af0ba085eaf27db.tar.gz
minetest-fe64f2b673d985d2842991014af0ba085eaf27db.tar.bz2
minetest-fe64f2b673d985d2842991014af0ba085eaf27db.zip
Silly MSVC doesn't know how to handle type conversions for parameters of pow(). Help it.
-rw-r--r--src/environment.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/environment.cpp b/src/environment.cpp
index ce25b0fe7..1951996a2 100644
--- a/src/environment.cpp
+++ b/src/environment.cpp
@@ -592,7 +592,7 @@ public:
float chance = abm->getTriggerChance();
if(chance == 0)
chance = 1;
- aabm.chance = 1.0 / pow(1.0 / chance, intervals);
+ aabm.chance = 1.0 / pow((float)1.0/chance, (float)intervals);
if(aabm.chance == 0)
aabm.chance = 1;
std::set<std::string> contents_s = abm->getTriggerContents();