src/main_gui.cpp
changeset 6952 b19643469024
parent 6898 d23c46e9a6ec
child 6953 230d1e3ac86c
equal deleted inserted replaced
6951:b24e0f108ede 6952:b19643469024
    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->money64 - p->current_loan, atoi(str) / _currency->rate);
    95 		int32 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));
  2206 			70, 1, (_pause_game || _patches.status_long_date) ? STR_00AF : STR_00AE, 0
  2206 			70, 1, (_pause_game || _patches.status_long_date) ? STR_00AF : STR_00AE, 0
  2207 		);
  2207 		);
  2208 
  2208 
  2209 		if (p != NULL) {
  2209 		if (p != NULL) {
  2210 			/* Draw player money */
  2210 			/* Draw player money */
  2211 			SetDParam64(0, p->money64);
  2211 			SetDParam64(0, p->player_money);
  2212 			DrawStringCentered(570, 1, p->player_money >= 0 ? STR_0004 : STR_0005, 0);
  2212 			DrawStringCentered(570, 1, p->player_money >= 0 ? STR_0004 : STR_0005, 0);
  2213 		}
  2213 		}
  2214 
  2214 
  2215 		/* Draw status bar */
  2215 		/* Draw status bar */
  2216 		if (w->message.msg) { // true when saving is active
  2216 		if (w->message.msg) { // true when saving is active