- attempt to see if this helps deal with oos when fog of war off

This commit is contained in:
SoftCoder 2016-05-23 09:51:50 -07:00
parent 32d7085816
commit ed6f169d97
3 changed files with 5 additions and 3 deletions

@ -1 +1 @@
Subproject commit 7a96907c89f5db8317b8e090737b404acdfc876e
Subproject commit a1e6be21823b1c597129e3c81f4301177c32fba7

View File

@ -451,7 +451,8 @@ float Ai::getRatioOfClass(UnitClass uc,UnitClass *additionalUnitClassToExcludeFr
return 0;
}
else {
return static_cast<float>(getCountOfClass(uc,additionalUnitClassToExcludeFromCount)) / aiInterface->getMyUnitCount();
//return static_cast<float>(getCountOfClass(uc,additionalUnitClassToExcludeFromCount)) / aiInterface->getMyUnitCount();
return truncateDecimal<float>(static_cast<float>(getCountOfClass(uc,additionalUnitClassToExcludeFromCount)) / aiInterface->getMyUnitCount(),6);
}
}

View File

@ -1145,7 +1145,8 @@ float Pixmap2D::getPixelf(int x, int y) const {
snprintf(szBuf,8096,"Invalid pixmap index: " MG_SIZE_T_SPECIFIER " for [%s], h = %d, w = %d, components = %d x = %d y = %d\n",index,path.c_str(),h,w,components,x,y);
throw megaglest_runtime_error(szBuf);
}
return pixels[index] / 255.f;
float result = pixels[index] / 255.f;
return truncateDecimal<float>(result,6);
}
float Pixmap2D::getComponentf(int x, int y, int component) const {