| 529 | } |
| 530 | |
| 531 | void ShivaHit(ItemInfo& target, ItemInfo& source, std::optional<GameVector> pos, int damage, bool isExplosive, int jointIndex) |
| 532 | { |
| 533 | if (pos.has_value()) |
| 534 | { |
| 535 | // If immune, ricochet without damage. |
| 536 | if (target.ItemFlags[1] != 0) |
| 537 | { |
| 538 | SoundEffect(SFX_TR4_WEAPON_RICOCHET, &target.Pose); |
| 539 | TriggerRicochetSpark(*pos, source.Pose.Orientation.y, false); |
| 540 | return; |
| 541 | } |
| 542 | |
| 543 | // If guarded, ricochet without damage. |
| 544 | if (target.Animation.ActiveState == SHIVA_STATE_WALK_FORWARD_GUARDING || |
| 545 | target.Animation.ActiveState == SHIVA_STATE_GUARD_IDLE) |
| 546 | { |
| 547 | SoundEffect(SFX_TR4_BADDY_SWORD_RICOCHET, &target.Pose); |
| 548 | TriggerRicochetSpark(*pos, source.Pose.Orientation.y, false); |
| 549 | return; |
| 550 | } |
| 551 | } |
| 552 | |
| 553 | DefaultItemHit(target, source, pos, damage, isExplosive, jointIndex); |
| 554 | } |
| 555 | } |
nothing calls this directly
no test coverage detected