1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

- Compile fixes for MVS

- AI goals will now be handled by smart pointers
This commit is contained in:
DjWarmonger
2013-11-09 21:29:46 +00:00
parent 29e98b2d51
commit 1657f124e1
6 changed files with 107 additions and 95 deletions

View File

@@ -10,6 +10,7 @@
#include "CModHandler.h"
#include "CTownHandler.h"
#include "CObjectHandler.h" //for hero specialty
#include <math.h>
/*
* CHeroHandler.cpp, part of VCMI engine
@@ -203,7 +204,7 @@ void CHeroClassHandler::afterLoadFinalization()
continue;
float chance = heroClass->defaultTavernChance * faction->town->defaultTavernChance;
heroClass->selectionProbability[faction->index] = round(sqrt(chance));
heroClass->selectionProbability[faction->index] = static_cast<int>(sqrt(chance) + 0.5); //FIXME: replace with std::round once MVS supports it
}
}
}