1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-29 09:29:10 +00:00

(svn r1086) -Fix: [Network] [ 1084774 ] Fixed quick-share-sell bug

This commit is contained in:
truelight
2004-12-14 18:17:24 +00:00
parent 55f3347514
commit 967762e5ef

View File

@@ -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));