equal
deleted
inserted
replaced
90 DoCommandP(0, id, 0, NULL, CMD_RENAME_WAYPOINT | CMD_MSG(STR_CANT_CHANGE_WAYPOINT_NAME)); |
90 DoCommandP(0, id, 0, NULL, CMD_RENAME_WAYPOINT | CMD_MSG(STR_CANT_CHANGE_WAYPOINT_NAME)); |
91 break; |
91 break; |
92 #ifdef ENABLE_NETWORK |
92 #ifdef ENABLE_NETWORK |
93 case 3: { // Give money, you can only give money in excess of loan |
93 case 3: { // Give money, you can only give money in excess of loan |
94 const Player *p = GetPlayer(_current_player); |
94 const Player *p = GetPlayer(_current_player); |
95 int32 money = min(p->player_money - p->current_loan, atoi(str) / _currency->rate); |
95 Money money = min(p->player_money - p->current_loan, atoi(str) / _currency->rate); |
96 |
96 |
97 money = clamp(money, 0, 20000000); // Clamp between 20 million and 0 |
97 money = clamp(money, 0, 20000000); // Clamp between 20 million and 0 |
98 |
98 |
99 /* Give 'id' the money, and substract it from ourself */ |
99 /* Give 'id' the money, and substract it from ourself */ |
100 DoCommandP(0, money, id, CcGiveMoney, CMD_GIVE_MONEY | CMD_MSG(STR_INSUFFICIENT_FUNDS)); |
100 DoCommandP(0, money, id, CcGiveMoney, CMD_GIVE_MONEY | CMD_MSG(STR_INSUFFICIENT_FUNDS)); |