| 5741 | } |
| 5742 | |
| 5743 | void cFodder::Sprite_Handle_Turret_Fire(sSprite* pSprite, sSprite* pData34) { |
| 5744 | int16 ax; |
| 5745 | |
| 5746 | sSprite* Data2C = 0; |
| 5747 | |
| 5748 | if (!pSprite->field_57) { |
| 5749 | if (!pSprite->field_54) |
| 5750 | return; |
| 5751 | } |
| 5752 | |
| 5753 | pSprite->field_54 = 0; |
| 5754 | int16 Field_0 = pSprite->field_0; |
| 5755 | int16 Field_4 = pSprite->field_4; |
| 5756 | |
| 5757 | int16 Data0 = pSprite->field_A; |
| 5758 | Data0 <<= 1; |
| 5759 | |
| 5760 | int16 Data4 = mSprite_Turret_Positions[Data0]; |
| 5761 | pSprite->field_0 += Data4; |
| 5762 | |
| 5763 | Data4 = mSprite_Turret_Positions[Data0 + 1]; |
| 5764 | pSprite->field_4 += Data4; |
| 5765 | |
| 5766 | mSprite_Missile_LaunchDistance_X = 0; |
| 5767 | mSprite_Missile_LaunchDistance_Y = 0; |
| 5768 | |
| 5769 | if (pSprite->field_6F != eVehicle_Turret_Homing) |
| 5770 | goto loc_2421D; |
| 5771 | |
| 5772 | if (!mTurretFires_HomingMissile) |
| 5773 | goto loc_2421D; |
| 5774 | |
| 5775 | ax = Sprite_Create_MissileHoming(pSprite, Data2C, pData34); |
| 5776 | goto loc_24234; |
| 5777 | |
| 5778 | loc_2421D:; |
| 5779 | |
| 5780 | if (pSprite->field_22 != eSprite_PersonType_Human) |
| 5781 | if (word_3B4ED[1] > 9) |
| 5782 | goto loc_24275; |
| 5783 | |
| 5784 | ax = Sprite_Create_Missile(pSprite, Data2C); |
| 5785 | |
| 5786 | loc_24234:; |
| 5787 | if (!ax) |
| 5788 | goto loc_2426C; |
| 5789 | |
| 5790 | Data2C->field_20 += 0x11; |
| 5791 | Data2C->field_36 = 0x3C; |
| 5792 | Sound_Play(pSprite, eSound_Effect_Turret_Fire, 0x1E); |
| 5793 | Sprite_Create_Smoke(pSprite, Data2C); |
| 5794 | pSprite->field_57 = 0; |
| 5795 | goto loc_24275; |
| 5796 | |
| 5797 | loc_2426C:; |
| 5798 | pSprite->field_57 = -1; |
| 5799 | |
| 5800 | loc_24275:; |
nothing calls this directly
no outgoing calls
no test coverage detected