mirror of
https://github.com/glest/glest-source.git
synced 2025-08-18 22:21:18 +02:00
- added more debuging
This commit is contained in:
@@ -70,8 +70,11 @@ void Command::setUnit(Unit *unit){
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string Command::toString() const {
|
std::string Command::toString() const {
|
||||||
std::string result;
|
std::string result = "";
|
||||||
result = "commandType = " + commandType->toString() + " pos = " + pos.getString() + " facing = " + intToStr(facing.asInt());
|
result = "commandType = " + commandType->toString() + " pos = " + pos.getString() + " facing = " + intToStr(facing.asInt());
|
||||||
|
if(unitType != NULL) {
|
||||||
|
result += " unitTypeId = " + intToStr(unitType->getId()) + " unitTypeDesc = " + unitType->getReqDesc();
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1279,6 +1279,16 @@ std::string Unit::toString() const {
|
|||||||
result += " name [" + this->type->getName() + "]";
|
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__);
|
//SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
|
||||||
result += " hp = " + intToStr(this->hp);
|
result += " hp = " + intToStr(this->hp);
|
||||||
|
Reference in New Issue
Block a user