bugfixes for attack boost did not properly rollback boost value sometimes for multiplier style boosts

This commit is contained in:
Mark Vejvoda
2013-06-06 04:10:49 +00:00
parent 4da10fc7fa
commit 4533da71bd
3 changed files with 35 additions and 3 deletions

View File

@@ -239,6 +239,13 @@ int round(float f);
//misc
bool checkVersionComptability(string clientVersionString, string serverVersionString);
template<typename T>
void enforceMinimumValue(T minValue, T &value) {
if(value < minValue) {
value = minValue;
}
}
template<typename T>
void deleteValues(T beginIt, T endIt){
for(T it= beginIt; it!=endIt; ++it){