- added more verbose info when tracking network CRC
This commit is contained in:
parent
78ed6d4601
commit
c7a2040fdc
|
@ -2241,10 +2241,31 @@ int64 Unit::getUpdatedProgress(int64 currentProgress, int64 updateFPS, int64 spe
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isNetworkCRCEnabled() == true) {
|
if(isNetworkCRCEnabled() == true) {
|
||||||
|
float height = map->getCell(pos)->getHeight();
|
||||||
|
float airHeight = game->getWorld()->getTileset()->getAirHeight();
|
||||||
|
int cellUnitHeight = -1;
|
||||||
|
int cellObjectHeight = -1;
|
||||||
|
|
||||||
|
Unit *unit = map->getCell(pos)->getUnit(fLand);
|
||||||
|
if(unit != NULL && unit->getType()->getHeight() > airHeight) {
|
||||||
|
cellUnitHeight = unit->getType()->getHeight();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
SurfaceCell *sc = map->getSurfaceCell(map->toSurfCoords(pos));
|
||||||
|
if(sc != NULL && sc->getObject() != NULL && sc->getObject()->getType() != NULL) {
|
||||||
|
if(sc->getObject()->getType()->getHeight() > airHeight) {
|
||||||
|
cellObjectHeight = sc->getObject()->getType()->getHeight();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
char szBuf[8096]="";
|
char szBuf[8096]="";
|
||||||
snprintf(szBuf,8095,"currentProgress = " MG_I64_SPECIFIER " updateFPS = " MG_I64_SPECIFIER " speed = " MG_I64_SPECIFIER " diagonalFactor = " MG_I64_SPECIFIER " heightFactor = " MG_I64_SPECIFIER " speedDenominator = " MG_I64_SPECIFIER " progressIncrease = " MG_I64_SPECIFIER " [" MG_I64_SPECIFIER "]",
|
snprintf(szBuf,8095,"currentProgress = " MG_I64_SPECIFIER " updateFPS = " MG_I64_SPECIFIER " speed = " MG_I64_SPECIFIER " diagonalFactor = " MG_I64_SPECIFIER " heightFactor = " MG_I64_SPECIFIER " speedDenominator = " MG_I64_SPECIFIER " progressIncrease = " MG_I64_SPECIFIER " [" MG_I64_SPECIFIER "] height [%f] airHeight [%f] cellUnitHeight [%d] cellObjectHeight [%d]",
|
||||||
currentProgress,updateFPS,speed,diagonalFactor,heightFactor,speedDenominator,progressIncrease,((speed * diagonalFactor * heightFactor) / speedDenominator));
|
currentProgress,updateFPS,speed,diagonalFactor,heightFactor,speedDenominator,progressIncrease,((speed * diagonalFactor * heightFactor) / speedDenominator),height,airHeight,cellUnitHeight,cellObjectHeight);
|
||||||
networkCRCLogInfo = szBuf;
|
networkCRCLogInfo = szBuf;
|
||||||
|
|
||||||
|
//printf("%s\n",szBuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
newProgress += progressIncrease;
|
newProgress += progressIncrease;
|
||||||
|
@ -4068,10 +4089,10 @@ void Unit::startDamageParticles() {
|
||||||
checkCustomizedParticleTriggers(false);
|
checkCustomizedParticleTriggers(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Unit::setTargetVec(const Vec3f &targetVec) {
|
//void Unit::setTargetVec(const Vec3f &targetVec) {
|
||||||
this->targetVec= targetVec;
|
// this->targetVec= targetVec;
|
||||||
logSynchData(extractFileFromDirectoryPath(__FILE__).c_str(),__LINE__);
|
// logSynchData(extractFileFromDirectoryPath(__FILE__).c_str(),__LINE__);
|
||||||
}
|
//}
|
||||||
|
|
||||||
void Unit::setMeetingPos(const Vec2i &meetingPos) {
|
void Unit::setMeetingPos(const Vec2i &meetingPos) {
|
||||||
this->meetingPos= meetingPos;
|
this->meetingPos= meetingPos;
|
||||||
|
|
|
@ -627,7 +627,7 @@ public:
|
||||||
void refreshPos();
|
void refreshPos();
|
||||||
void setTargetPos(const Vec2i &targetPos);
|
void setTargetPos(const Vec2i &targetPos);
|
||||||
void setTarget(const Unit *unit);
|
void setTarget(const Unit *unit);
|
||||||
void setTargetVec(const Vec3f &targetVec);
|
//void setTargetVec(const Vec3f &targetVec);
|
||||||
void setMeetingPos(const Vec2i &meetingPos);
|
void setMeetingPos(const Vec2i &meetingPos);
|
||||||
void setVisible(const bool visible);
|
void setVisible(const bool visible);
|
||||||
inline bool getVisible() const { return visible; }
|
inline bool getVisible() const { return visible; }
|
||||||
|
|
|
@ -38,6 +38,7 @@ IF(BUILD_MEGAGLEST_TESTS)
|
||||||
SET(DIRS_WITH_SRC
|
SET(DIRS_WITH_SRC
|
||||||
./
|
./
|
||||||
shared_lib/graphics
|
shared_lib/graphics
|
||||||
|
shared_lib/streflop
|
||||||
shared_lib/util
|
shared_lib/util
|
||||||
shared_lib/xml)
|
shared_lib/xml)
|
||||||
|
|
||||||
|
@ -60,7 +61,14 @@ IF(BUILD_MEGAGLEST_TESTS)
|
||||||
${GLEST_LIB_INCLUDE_ROOT}xml/rapidxml
|
${GLEST_LIB_INCLUDE_ROOT}xml/rapidxml
|
||||||
${GLEST_LIB_INCLUDE_ROOT}glew
|
${GLEST_LIB_INCLUDE_ROOT}glew
|
||||||
${GLEST_LIB_INCLUDE_ROOT}lua
|
${GLEST_LIB_INCLUDE_ROOT}lua
|
||||||
${GLEST_LIB_INCLUDE_ROOT}map)
|
${GLEST_LIB_INCLUDE_ROOT}map
|
||||||
|
|
||||||
|
${PROJECT_SOURCE_DIR}/source/glest_game/graphics
|
||||||
|
${PROJECT_SOURCE_DIR}/source/glest_game/world
|
||||||
|
${PROJECT_SOURCE_DIR}/source/glest_game/sound
|
||||||
|
${PROJECT_SOURCE_DIR}/source/glest_game/type_instances
|
||||||
|
${PROJECT_SOURCE_DIR}/source/glest_game/types
|
||||||
|
)
|
||||||
|
|
||||||
IF(WANT_STREFLOP)
|
IF(WANT_STREFLOP)
|
||||||
SET(GLEST_LIB_INCLUDE_DIRS
|
SET(GLEST_LIB_INCLUDE_DIRS
|
||||||
|
|
Loading…
Reference in New Issue