Advertisement
Guest User

Untitled

a guest
Jan 13th, 2020
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     if (IsSavegameVersionBefore(SLV_LIFETIME_PROFIT)) {
  2.         for (Vehicle *v : Vehicle::Iterate()) {
  3.             YearMonthDay cur_date;
  4.             ConvertDateToYMD(_date, &cur_date);
  5.             YearMonthDay birth_date;
  6.             ConvertDateToYMD(_date - v->age, &birth_date);
  7.             if (cur_date.year - birth_date.year >= 2) {
  8.                 v->profit_lifetime = v->profit_last_year;
  9.             } else {
  10.                 v->profit_lifetime = 0;
  11.             }
  12.         }
  13.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement