Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 2
- void __usercall BulletBehaviour_Bounce(CBULLET *a1@<edi>)
- {
- CUNIT *v1; // eax
- char v2; // al
- CUNIT *v3; // ebx
- CIMAGE *i; // esi
- CUNIT *v5; // eax
- CSPRITE *v6; // edx
- CIMAGE *j; // esi
- v1 = a1->targetUnit;
- if ( v1 )
- {
- if ( !(a1->hitFlags & 1) )
- sub_495240(a1, v1->sprite->position.y, v1->sprite->position.x);
- }
- sub_48B250(a1);
- if ( a1->field_10.x == a1->position.x && a1->field_10.y == a1->position.y )
- {
- v2 = a1->ubChain - 1;
- a1->ubChain = v2;
- if ( v2 && (v3 = FindNextBounceTarget(a1), a1->nextBounceUnit = a1->targetUnit, v3) )
- {
- for ( i = a1->sprite->overlay; i; i = i->next )
- playImageIscript(i, ISCRIPT_Anim_SpecialState1);
- a1->targetUnit = v3;
- }
- else
- {
- v5 = a1->targetUnit;
- a1->behaviourType = 5;
- if ( v5 )
- {
- a1->flyToPositioin.x = v5->sprite->position.x;
- a1->flyToPositioin.y = v5->sprite->position.y;
- }
- else
- {
- a1->targetUnit = 0;
- }
- v6 = a1->sprite;
- LOBYTE(a1->field_4E) = 0;
- a1->someUnitType = UNITID_None;
- for ( j = v6->overlay; j; j = j->next )
- playImageIscript(j, ISCRIPT_Anim_Death);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement