Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1.     /* Decrease if needed */
  2.     if (div > 0) i->prod_level = max(i->prod_level / (2 << (div - 1)), (int)PRODLEVEL_MINIMUM);
  3.     if (i->prod_level == PRODLEVEL_MINIMUM) {
  4.         closeit = true;
  5.     } else {
  6.         recalculate_multipliers = true;
  7.         if (str == STR_NULL) str = indspec->production_down_text;
  8.     }
  9.  
  10.     while (div-- != 0 && !closeit) {
  11.         if (i->prod_level == PRODLEVEL_MINIMUM) {
  12.             closeit = true;
  13.         } else {
  14.             i->prod_level = max(i->prod_level / 2, (int)PRODLEVEL_MINIMUM); // typecast to int required to please MSVC
  15.             recalculate_multipliers = true;
  16.             if (str == STR_NULL) str = indspec->production_down_text;
  17.         }
  18.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement