From 405f327836e37a0da72b1fe5164e12ecddb7f0c3 Mon Sep 17 00:00:00 2001 From: titiger Date: Wed, 18 Nov 2015 21:23:27 +0100 Subject: [PATCH] "upgrade finished" message only for own faction. --- source/glest_game/type_instances/faction.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/glest_game/type_instances/faction.cpp b/source/glest_game/type_instances/faction.cpp index f22fe0ce4..1cf5550a1 100644 --- a/source/glest_game/type_instances/faction.cpp +++ b/source/glest_game/type_instances/faction.cpp @@ -887,8 +887,10 @@ void Faction::cancelUpgrade(const UpgradeType *ut){ void Faction::finishUpgrade(const UpgradeType *ut){ upgradeManager.finishUpgrade(ut); - Console *console=world->getGame()->getConsole(); - console->addStdMessage("UpgradeFinished",": " + formatString(ut->getName(true))); + if(world->getThisFaction()!=NULL && this->getIndex()==world->getThisFaction()->getIndex()){ + Console *console=world->getGame()->getConsole(); + console->addStdMessage("UpgradeFinished",": " + formatString(ut->getName(true))); + } for(int i=0; iapplyUpgrade(ut); }