Skip to content

Commit

Permalink
Restore missing check, so artefacts are only dropped by factories.
Browse files Browse the repository at this point in the history
Check went missing in 29966c5. (Although the entire
function was skipped before 29966c5.)
  • Loading branch information
Cyp committed Apr 1, 2012
1 parent f6fe0b7 commit aaeaa41
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/multigifts.cpp
Expand Up @@ -529,7 +529,16 @@ bool recvAlliance(NETQUEUE queue, bool allowAudio)
// add an artifact on destruction if required.
void technologyGiveAway(const STRUCTURE *pS)
{
syncDebug("Adding artefact.");
// If a fully built factory (or with modules under construction) which is our responsibility got destroyed
if (pS->pStructureType->type == REF_FACTORY && (pS->status == SS_BUILT || pS->currentBuildPts >= pS->body))
{
syncDebug("Adding artefact.");
}
else
{
syncDebug("Not adding artefact.");
return;
}

int featureIndex;
for (featureIndex = 0; featureIndex < numFeatureStats && asFeatureStats[featureIndex].subType != FEAT_GEN_ARTE; ++featureIndex) {}
Expand Down

0 comments on commit aaeaa41

Please sign in to comment.