SHARE
TWEET

Untitled

a guest Jan 13th, 2020 67 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.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top