Stop trucks from ever building on burning oil resources (fixes bug #181)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7339 4a71c877-e1ca-e34f-864e-861f7616d084
master
Guangcong Luo 2009-05-06 18:36:04 +00:00 committed by Git SVN Gateway
parent b6460140df
commit fedd43dbe4
1 changed files with 6 additions and 0 deletions

View File

@ -1068,6 +1068,12 @@ BOOL droidStartBuild(DROID *psDroid)
intBuildFinished(psDroid); intBuildFinished(psDroid);
return false; return false;
} }
// Can't build on burning oil derricks.
if (psStructStat->type == REF_RESOURCE_EXTRACTOR && fireOnLocation(psDroid->orderX,psDroid->orderY))
{
intBuildFinished(psDroid);
return false;
}
//ok to build //ok to build
psStruct = buildStructure(psStructStat, psDroid->orderX,psDroid->orderY, psDroid->player,false); psStruct = buildStructure(psStructStat, psDroid->orderX,psDroid->orderY, psDroid->player,false);
if (!psStruct) if (!psStruct)