Commit 38e4ede3 authored by Romain Bignon's avatar Romain Bignon

move code in the right place

parent 9135a92d
......@@ -242,8 +242,6 @@ void ECEntity::Invest(ECBEntity* e)
{
if(!Owner())
Debug(W_WARNING, "ECEntity::Invest(): A neutral unity (%d) invests an other entity (%s: %d) !?!?!?", Type(), e->LongName().c_str(), e->Type());
if(e->IsCountryMaker())
Case()->Country()->ChangeOwner(Owner() ? Owner()->MapPlayer() : 0);
e->ChangeOwner(Owner());
}
......@@ -278,6 +276,9 @@ void ECEntity::ChangeOwner(ECBPlayer* pl)
if(Owner())
Owner()->Events()->Add(*evti);
}
if(IsCountryMaker())
Case()->Country()->ChangeOwner(Owner() ? Owner()->MapPlayer() : 0);
}
bool ECEntity::AreFriends(std::vector<ECEntity*> list)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment