(svn r1520) Trim 134 (!) lines with trailing whitespace ):
This commit is contained in:
10
economy.c
10
economy.c
@@ -106,7 +106,7 @@ int64 CalculateCompanyValue(Player *p) {
|
||||
}
|
||||
|
||||
value += p->money64 - p->current_loan; // add real money value
|
||||
|
||||
|
||||
return max(value, 1);
|
||||
}
|
||||
|
||||
@@ -1532,8 +1532,8 @@ int32 CmdBuyShareInCompany(int x, int y, uint32 flags, uint32 p1, uint32 p2)
|
||||
|
||||
SET_EXPENSES_TYPE(EXPENSES_OTHER);
|
||||
p = DEREF_PLAYER(p1);
|
||||
|
||||
|
||||
|
||||
|
||||
if (_cur_year - p->inaugurated_year < 6) {
|
||||
_error_message = STR_7080_PROTECTED;
|
||||
return CMD_ERROR;
|
||||
@@ -1550,7 +1550,7 @@ int32 CmdBuyShareInCompany(int x, int y, uint32 flags, uint32 p1, uint32 p2)
|
||||
/* We can not buy out a real player in networking */
|
||||
if (GetAmountOwnedBy(p, OWNER_SPECTATOR) == 1 && !p->is_ai)
|
||||
return 0;
|
||||
|
||||
|
||||
cost = CalculateCompanyValue(p) >> 2;
|
||||
if (flags & DC_EXEC) {
|
||||
b = p->share_owners;
|
||||
@@ -1581,7 +1581,7 @@ int32 CmdSellShareInCompany(int x, int y, uint32 flags, uint32 p1, uint32 p2)
|
||||
/* Check if selling shares is allowed (protection against modified clients */
|
||||
if (!_patches.allow_shares)
|
||||
return CMD_ERROR;
|
||||
|
||||
|
||||
/* Those lines are here for network-protection (clients can be slow) */
|
||||
if (GetAmountOwnedBy(p, _current_player) == 0)
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user