| 1196 | } |
| 1197 | |
| 1198 | void HitTarget(ItemInfo* laraItem, ItemInfo* targetEntity, GameVector* hitPos, int damage, bool isExplosive, int bestJointIndex) |
| 1199 | { |
| 1200 | const auto& object = Objects[targetEntity->ObjectNumber]; |
| 1201 | |
| 1202 | targetEntity->HitStatus = true; |
| 1203 | if (targetEntity->IsCreature()) |
| 1204 | GetCreatureInfo(targetEntity)->HurtByLara = true; |
| 1205 | |
| 1206 | if (object.HitRoutine == nullptr) |
| 1207 | return; |
| 1208 | |
| 1209 | if (hitPos != nullptr) |
| 1210 | { |
| 1211 | hitPos->RoomNumber = targetEntity->RoomNumber; |
| 1212 | object.HitRoutine(*targetEntity, *laraItem, *hitPos, damage, isExplosive, bestJointIndex); |
| 1213 | } |
| 1214 | else |
| 1215 | { |
| 1216 | object.HitRoutine(*targetEntity, *laraItem, std::nullopt, damage, isExplosive, bestJointIndex); |
| 1217 | } |
| 1218 | } |
| 1219 | |
| 1220 | void SmashItem(short itemNumber) |
| 1221 | { |
no test coverage detected