From fe64f2b673d985d2842991014af0ba085eaf27db Mon Sep 17 00:00:00 2001
From: Perttu Ahola <celeron55@gmail.com>
Date: Mon, 28 Nov 2011 21:50:14 +0200
Subject: [PATCH] Silly MSVC doesn't know how to handle type conversions for
 parameters of pow(). Help it.

---
 src/environment.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 @@ class ABMHandler
 			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();
-- 
GitLab