| 6099 | } |
| 6100 | |
| 6101 | void cFodder::Sprite_Handle_Helicopter_Human_Deploy_Weapon(sSprite* pSprite) { |
| 6102 | sSprite* Data2C = 0, *Data34 = 0; |
| 6103 | |
| 6104 | if (!pSprite->field_57) |
| 6105 | if (!pSprite->field_54) |
| 6106 | return; |
| 6107 | |
| 6108 | pSprite->field_54 = 0; |
| 6109 | |
| 6110 | if (pSprite->field_20 <= 0x1F) |
| 6111 | return; |
| 6112 | |
| 6113 | if (pSprite->field_6F == eVehicle_Helicopter_Grenade) |
| 6114 | goto loc_24905; |
| 6115 | |
| 6116 | if (pSprite->field_6F == eVehicle_Helicopter_Missile) |
| 6117 | goto loc_24917; |
| 6118 | |
| 6119 | if (pSprite->field_6F == eVehicle_Helicopter_Homing) |
| 6120 | goto loc_24917; |
| 6121 | |
| 6122 | return; |
| 6123 | |
| 6124 | loc_24905:; |
| 6125 | if (!Sprite_Create_Grenade2(pSprite)) |
| 6126 | goto loc_2490D; |
| 6127 | goto loc_24942; |
| 6128 | |
| 6129 | loc_2490D:; |
| 6130 | pSprite->field_57 = -1; |
| 6131 | return; |
| 6132 | |
| 6133 | loc_24917:; |
| 6134 | mSprite_Missile_LaunchDistance_X = 0x0E; |
| 6135 | mSprite_Missile_LaunchDistance_Y = -12; |
| 6136 | |
| 6137 | // Homing Missle and can get lock on a target? |
| 6138 | if (pSprite->field_6F == eVehicle_Helicopter_Homing && |
| 6139 | Sprite_Homing_LockInRange(pSprite, Data34)) { |
| 6140 | |
| 6141 | // Launch a homing missile |
| 6142 | if (!Sprite_Create_MissileHoming(pSprite, Data2C, Data34)) |
| 6143 | goto loc_2490D; |
| 6144 | |
| 6145 | } |
| 6146 | else { |
| 6147 | // Launch a missile |
| 6148 | if (!Sprite_Create_Missile(pSprite, Data2C)) |
| 6149 | goto loc_2490D; |
| 6150 | } |
| 6151 | |
| 6152 | loc_24942:; |
| 6153 | pSprite->field_57 = 0; |
| 6154 | } |
| 6155 | |
| 6156 | int16 cFodder::Sprite_Create_Grenade2(sSprite* pSprite) { |
| 6157 | int16 Data0, Data4, Data8, DataC; |
nothing calls this directly
no outgoing calls
no test coverage detected