diff options
author | truelight <truelight@openttd.org> | 2004-12-14 18:17:24 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2004-12-14 18:17:24 +0000 |
commit | f957e2ccffe96204f8a680d62e3a13b8daffd262 (patch) | |
tree | de5a9a2e95463804609f0e7e6a89e761fcff4320 | |
parent | 9dec8ca01ee7cffa67fe9a4f50fea3413177f2f4 (diff) | |
download | openttd-f957e2ccffe96204f8a680d62e3a13b8daffd262.tar.xz |
(svn r1086) -Fix: [Network] [ 1084774 ] Fixed quick-share-sell bug
-rw-r--r-- | economy.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1514,6 +1514,10 @@ int32 CmdSellShareInCompany(int x, int y, uint32 flags, uint32 p1, uint32 p2) SET_EXPENSES_TYPE(EXPENSES_OTHER); p = DEREF_PLAYER(p1); + /* Those lines are here for network-protection (clients can be slow) */ + if (GetAmountOwnedBy(p, _current_player) == 0) + return 0; + /* adjust it a little to make it less profitable to sell and buy */ cost = CalculateCompanyValue(p) >> 2; cost = -(cost - (cost >> 7)); |