- attempt to see if this helps deal with oos when fog of war off
This commit is contained in:
parent
32d7085816
commit
ed6f169d97
|
@ -1 +1 @@
|
||||||
Subproject commit 7a96907c89f5db8317b8e090737b404acdfc876e
|
Subproject commit a1e6be21823b1c597129e3c81f4301177c32fba7
|
|
@ -451,7 +451,8 @@ float Ai::getRatioOfClass(UnitClass uc,UnitClass *additionalUnitClassToExcludeFr
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else {
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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);
|
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);
|
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 {
|
float Pixmap2D::getComponentf(int x, int y, int component) const {
|
||||||
|
|
Loading…
Reference in New Issue