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:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user