zone: don't assign to cages which are designated but not yet placed (minor fix, it's not like bad things happen without it)

develop
Robert Heinrich 2012-04-17 18:11:14 +02:00
parent 40f36c1912
commit 299510f0d9
2 changed files with 10 additions and 0 deletions

@ -386,6 +386,8 @@ command_result df_bprobe (color_ostream &out, vector <string> & parameters)
out << ", is room";
else
out << ", not a room";
if(building.origin->getBuildStage()!=building.origin->getMaxBuildStage())
out << ", in construction";
out.print("\n");

@ -897,6 +897,10 @@ int32_t findCageAtCursor()
building->z == cursor->z))
continue;
// don't set id if cage is not constructed yet
if(building->getBuildStage()!=building->getMaxBuildStage())
break;
if(isCage(building))
{
foundID = building->id;
@ -1122,6 +1126,10 @@ df::building * getBuiltCageAtPos(df::coord pos)
&& building->y1 == pos.y
&& building->z == pos.z )
{
// don't set pointer if not constructed yet
if(building->getBuildStage()!=building->getMaxBuildStage())
break;
cage = building;
break;
}