More debug code to find unit mismatch
This commit is contained in:
parent
9159d44b7a
commit
badd795865
|
@ -487,7 +487,9 @@ std::string Faction::toString() const {
|
||||||
result += "thisFaction = " + intToStr(this->thisFaction) + "\n";
|
result += "thisFaction = " + intToStr(this->thisFaction) + "\n";
|
||||||
result += "control = " + intToStr(this->control) + "\n";
|
result += "control = " + intToStr(this->control) + "\n";
|
||||||
|
|
||||||
result += this->factionType->toString() + "\n";
|
if(this->factionType != NULL) {
|
||||||
|
result += this->factionType->toString() + "\n";
|
||||||
|
}
|
||||||
|
|
||||||
result += this->upgradeManager.toString() + "\n";
|
result += this->upgradeManager.toString() + "\n";
|
||||||
|
|
||||||
|
|
|
@ -587,8 +587,12 @@ void UnitUpdater::updateProduce(Unit *unit){
|
||||||
unit->setCurrSkill(scStop);
|
unit->setCurrSkill(scStop);
|
||||||
produced= new Unit(world->getNextUnitId(), Vec2i(0), pct->getProducedUnit(), unit->getFaction(), world->getMap(), CardinalDir::NORTH);
|
produced= new Unit(world->getNextUnitId(), Vec2i(0), pct->getProducedUnit(), unit->getFaction(), world->getMap(), CardinalDir::NORTH);
|
||||||
|
|
||||||
|
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] about to place unit for unit [%s]\n",__FILE__,__FUNCTION__,__LINE__,produced->toString().c_str());
|
||||||
|
|
||||||
//place unit creates the unit
|
//place unit creates the unit
|
||||||
if(!world->placeUnit(unit->getCenteredPos(), 10, produced)){
|
if(!world->placeUnit(unit->getCenteredPos(), 10, produced)) {
|
||||||
|
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] COULD NOT PLACE UNIT for unitID [%d]\n",__FILE__,__FUNCTION__,__LINE__,produced->getId());
|
||||||
|
|
||||||
delete produced;
|
delete produced;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|
Loading…
Reference in New Issue