Silly MSVC doesn't know how to handle type conversions for parameters of pow(). Help it.
authorPerttu Ahola <celeron55@gmail.com>
Mon, 28 Nov 2011 19:50:14 +0000 (21:50 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Tue, 29 Nov 2011 17:13:57 +0000 (19:13 +0200)
src/environment.cpp

index ce25b0fe7f71eadb18ede0da35071d58130faf6c..1951996a23135f0330aa6c40f1dc4e313e03e56d 100644 (file)
@@ -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();