Advertisement
Pr0nogo

Untitled

Jul 19th, 2020
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. // 1
  2. void __usercall ZergPlaceBuildingCntd(int a1@<eax>)
  3. {
  4. CUNIT *v1; // esi
  5. int v2; // edi
  6. int v3; // ecx
  7. int v4; // eax
  8. int v5; // ebx
  9. CIMAGE *i; // esi
  10.  
  11. v1 = (CUNIT *)a1;
  12. v2 = *(unsigned __int16 *)(a1 + 2 * *(unsigned __int8 *)(a1 + 164) + 152);
  13. v3 = *(unsigned __int8 *)(a1 + 76);
  14. v4 = 3 * unitsdat_GasCost[v2];
  15. ore[v3] += 3 * unitsdat_OreCost[v2] / 4;
  16. gas[v3] += v4 / 4;
  17. v1->trainQueue[(unsigned __int8)v1->queueSlot] = 228;
  18. v5 = v1->hp;
  19. v1->statusFlags |= 1u;
  20. incrementUnitScoresEx(-1, v1, 1);
  21. v1->statusFlags &= 0xFFFFFFFE;
  22. updateUnitStatsFinishBuilding(v1);
  23. updateUnitStrengthAndApplyDefaultOrders(v1);
  24. setUnitHP(v1, v5);
  25. BWFXN_PlaySndFromSrc(4, v1, 1, 0);
  26. for ( i = v1->sprite->overlay; i; i = i->next )
  27. playImageIscript(i, 15);
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement