Advertisement
Pr0nogo

Untitled

Jul 8th, 2020
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. // 2
  2. void __usercall BulletBehaviour_Bounce(CBULLET *a1@<edi>)
  3. {
  4. CUNIT *v1; // eax
  5. char v2; // al
  6. CUNIT *v3; // ebx
  7. CIMAGE *i; // esi
  8. CUNIT *v5; // eax
  9. CSPRITE *v6; // edx
  10. CIMAGE *j; // esi
  11.  
  12. v1 = a1->targetUnit;
  13. if ( v1 )
  14. {
  15. if ( !(a1->hitFlags & 1) )
  16. sub_495240(a1, v1->sprite->position.y, v1->sprite->position.x);
  17. }
  18. sub_48B250(a1);
  19. if ( a1->field_10.x == a1->position.x && a1->field_10.y == a1->position.y )
  20. {
  21. v2 = a1->ubChain - 1;
  22. a1->ubChain = v2;
  23. if ( v2 && (v3 = FindNextBounceTarget(a1), a1->nextBounceUnit = a1->targetUnit, v3) )
  24. {
  25. for ( i = a1->sprite->overlay; i; i = i->next )
  26. playImageIscript(i, ISCRIPT_Anim_SpecialState1);
  27. a1->targetUnit = v3;
  28. }
  29. else
  30. {
  31. v5 = a1->targetUnit;
  32. a1->behaviourType = 5;
  33. if ( v5 )
  34. {
  35. a1->flyToPositioin.x = v5->sprite->position.x;
  36. a1->flyToPositioin.y = v5->sprite->position.y;
  37. }
  38. else
  39. {
  40. a1->targetUnit = 0;
  41. }
  42. v6 = a1->sprite;
  43. LOBYTE(a1->field_4E) = 0;
  44. a1->someUnitType = UNITID_None;
  45. for ( j = v6->overlay; j; j = j->next )
  46. playImageIscript(j, ISCRIPT_Anim_Death);
  47. }
  48. }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement