Skip to content

Commit

Permalink
Items can no longer be destroyed with splash damage when laying on th…
Browse files Browse the repository at this point in the history
…e ground
  • Loading branch information
Andrettin committed Dec 25, 2015
1 parent 6f68085 commit 7ef68f7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ai/ai_resource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1600,7 +1600,10 @@ void AiResourceManager()
AiCheckingWork();

// Look if we can build a farm in advance.
if (!AiPlayer->NeedSupply && AiPlayer->Player->Supply == AiPlayer->Player->Demand) {
//Wyrmgus start
// if (!AiPlayer->NeedSupply && AiPlayer->Player->Supply == AiPlayer->Player->Demand) {
if (!AiPlayer->NeedSupply && AiPlayer->Player->Supply <= AiPlayer->Player->Demand) {
//Wyrmgus end
AiRequestSupply();
}

Expand Down
4 changes: 4 additions & 0 deletions src/missile/missile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1151,6 +1151,10 @@ static void MissileHitsGoal(const Missile &missile, CUnit &goal, int splash)
}

//Wyrmgus start
if (goal.Type->BoolFlag[ITEM_INDEX].value && splash != 1) { //don't damage items with splash damage
return;
}

if (!missile.Type->AlwaysHits && CalculateHit(*missile.SourceUnit, *goal.Stats, &goal) == false) {
if (splash == 1 && missile.Type->Range <= 1) {
return;
Expand Down

0 comments on commit 7ef68f7

Please sign in to comment.