Advertisement
Guest User

Untitled

a guest
May 27th, 2016
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.40 KB | None | 0 0
  1. org_num_1 = 2;
  2. org_num = 136; // gen_start with Cult of Sirius(136/34=4)
  3. v17 = 2;
  4. org_funds_ = save_funding + 2; // 468*2
  5. do
  6. {
  7. org_num_2 = 0;
  8. hostile_org_count = 0;
  9. do
  10. {
  11. if ( org_num_2 != org_num_1 && org_num_2 != 1 )
  12. {
  13. v3 = 0; // no_hostlile
  14. if ( *(&relation_formerly[org_num_1].field_3 + org_num_2) <= relation_hostile_lim )// relation_hostile_lim == db 0CEh
  15. v3 = 1; // hostile
  16. if ( v3 )
  17. hostile_org_count += 2;
  18. }
  19. ++org_num_2;
  20. }
  21. while ( org_num_2 < 27 );
  22. buy_veh_fund = (org_veh_fund_init[v17] + hostile_org_count) * org_funds_->balance / 100;
  23. org_funds_->balance -= buy_veh_fund;
  24. polis_offset = 80 * (org_num_1 == 3); // for Megapol: 20*4 offset in array
  25. veh_count = 0;
  26. do
  27. {
  28. veh = *(&gen_org_veh_list[make_random(19)] + polis_offset);// note: &gen_org_veh_list[make_random(19) + polic_offset]
  29. v8 = org_num + 2 * veh;
  30. if ( *(veh_park + v8) < veh_lim[veh] )
  31. {
  32. price = veh_economic[veh].current_price;
  33. if ( buy_veh_fund >= price )
  34. {
  35. buy_veh_fund -= price;
  36. ++*(veh_park + v8);
  37. }
  38. }
  39. ++veh_count;
  40. }
  41. while ( veh_count < 50 );
  42. org_num_1 = v7 + 1;
  43. ++v17;
  44. org_funds_->balance += buy_veh_fund;
  45. result = org_num + 68;
  46. ++org_funds_;
  47. org_num += 68;
  48. }
  49. while ( org_num_1 < 27 );
  50. org__ = 0;
  51. org_funds = save_funding; // this part not used !!! (combat_value not used in game)
  52. v19 = 0;
  53. do
  54. {
  55. org_funds->combat_value = 0;
  56. if ( org__ != 1 )
  57. {
  58. v13 = &veh_struct;
  59. veh_num = 0;
  60. do
  61. {
  62. if ( *v13 >> 16 != -1 && *(v13 + 298) >> 16 == org__ )// -1=does not exist; (v13 + 298)=owner
  63. org_funds->combat_value += init_craft_data[*(v13 + 2) >> 16].agressivenes;
  64. ++veh_num;
  65. v13 = (v13 + 630);
  66. }
  67. while ( veh_num < 80 );
  68. result = 0;
  69. do
  70. {
  71. v15 = 2 * result;
  72. v16 = result++;
  73. org_funds->combat_value += *(&veh_park[v19] + v15) * init_craft_data[v16].agressivenes;
  74. }
  75. while ( result < 34 );
  76. }
  77. ++org__;
  78. ++org_funds;
  79. v19 += 34;
  80. }
  81. while ( org__ < 27 );
  82. return result;
  83. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement