From: Perttu Ahola Date: Mon, 28 Nov 2011 19:50:14 +0000 (+0200) Subject: Silly MSVC doesn't know how to handle type conversions for parameters of pow(). Help it. X-Git-Tag: 0.4.dev-20111201-0~33 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=fe64f2b673d985d2842991014af0ba085eaf27db;p=oweals%2Fminetest.git Silly MSVC doesn't know how to handle type conversions for parameters of pow(). Help it. --- 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 contents_s = abm->getTriggerContents();