src/player_base.h
changeset 10372 93844492fdd9
parent 10284 4f4086cd9585
child 10382 d1d4452acbfc
equal deleted inserted replaced
10371:f4ebcb863ad6 10372:93844492fdd9
    71 	int16 engine_renew_months;
    71 	int16 engine_renew_months;
    72 	uint32 engine_renew_money;
    72 	uint32 engine_renew_money;
    73 	uint16 num_engines[TOTAL_NUM_ENGINES]; ///< caches the number of engines of each type the player owns (no need to save this)
    73 	uint16 num_engines[TOTAL_NUM_ENGINES]; ///< caches the number of engines of each type the player owns (no need to save this)
    74 };
    74 };
    75 
    75 
       
    76 struct PlayerMoneyBackup {
       
    77 private:
       
    78 	Money backup_yearly_expenses[EXPENSES_END];
       
    79 	PlayerEconomyEntry backup_cur_economy;
       
    80 	Player *p;
       
    81 
       
    82 public:
       
    83 	PlayerMoneyBackup(Player *player);
       
    84 
       
    85 	void Restore();
       
    86 };
       
    87 
    76 extern Player _players[MAX_PLAYERS];
    88 extern Player _players[MAX_PLAYERS];
    77 #define FOR_ALL_PLAYERS(p) for (p = _players; p != endof(_players); p++)
    89 #define FOR_ALL_PLAYERS(p) for (p = _players; p != endof(_players); p++)
    78 
    90 
    79 static inline byte ActivePlayerCount()
    91 static inline byte ActivePlayerCount()
    80 {
    92 {