- bugfix for streflop_test on windows

This commit is contained in:
SoftCoder 2014-02-01 11:25:01 -08:00
parent bf5001a49a
commit 20789087d9
1 changed files with 7 additions and 2 deletions

View File

@ -10,6 +10,11 @@
// ==============================================================
#include <cppunit/extensions/HelperMacros.h>
#ifdef WIN32
#include <winsock2.h>
#include <winsock.h>
#endif
#include "vec.h"
#include "skill_type.h"
#include <memory>
@ -207,13 +212,13 @@ public:
height = truncateDecimal<float>(height,6);
if(cellLandUnitHeight >= 0 && cellLandUnitHeight > airHeight) {
height += (std::min((float)cellLandUnitHeight,standardAirHeight * 3) - airHeight);
height += (min((float)cellLandUnitHeight,standardAirHeight * 3) - airHeight);
height = truncateDecimal<float>(height,6);
}
else {
if(cellObjectHeight >= 0) {
if(cellObjectHeight > airHeight) {
height += (std::min((float)cellObjectHeight,standardAirHeight * 3) - airHeight);
height += (min((float)cellObjectHeight,standardAirHeight * 3) - airHeight);
height = truncateDecimal<float>(height,6);
}
}