- added more debuging

This commit is contained in:
Mark Vejvoda
2010-05-29 16:55:55 +00:00
parent e4f885ecf3
commit e8cc925a8b
2 changed files with 14 additions and 1 deletions

View File

@@ -70,8 +70,11 @@ void Command::setUnit(Unit *unit){
}
std::string Command::toString() const {
std::string result;
std::string result = "";
result = "commandType = " + commandType->toString() + " pos = " + pos.getString() + " facing = " + intToStr(facing.asInt());
if(unitType != NULL) {
result += " unitTypeId = " + intToStr(unitType->getId()) + " unitTypeDesc = " + unitType->getReqDesc();
}
return result;
}

View File

@@ -1279,6 +1279,16 @@ std::string Unit::toString() const {
result += " name [" + this->type->getName() + "]";
}
if(this->faction != NULL) {
result = "FactionIndex = " + intToStr(this->faction->getIndex()) + "\n";
result += "teamIndex = " + intToStr(this->faction->getTeam()) + "\n";
result += "startLocationIndex = " + intToStr(this->faction->getStartLocationIndex()) + "\n";
result += "thisFaction = " + intToStr(this->faction->getThisFaction()) + "\n";
result += "control = " + intToStr(this->faction->getControlType()) + "\n";
if(this->faction->getType() != NULL) {
result += "factionName = " + this->faction->getType()->getName() + "\n";
}
}
//SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
result += " hp = " + intToStr(this->hp);