MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / HeavyGuardHit

Function HeavyGuardHit

TombEngine/Objects/TR5/Entity/HeavyGuard.cpp:524–539  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

522 }
523
524 void HeavyGuardHit(ItemInfo& target, ItemInfo& source, std::optional<GameVector> pos, int damage, bool isExplosive, int jointIndex)
525 {
526 if (pos.has_value())
527 {
528 if (jointIndex == 2)
529 {
530 DoBloodSplat(pos->x, pos->y, pos->z, 10, source.Pose.Orientation.y, pos->RoomNumber);
531 DoDamage(&target, INT_MAX);
532 }
533 else
534 {
535 SoundEffect(SFX_TR4_BADDY_SWORD_RICOCHET, &target.Pose);
536 TriggerRicochetSpark(*pos, source.Pose.Orientation.y, false);
537 }
538 }
539 }
540}

Callers

nothing calls this directly

Calls 5

DoBloodSplatFunction · 0.85
DoDamageFunction · 0.85
SoundEffectFunction · 0.85
TriggerRicochetSparkFunction · 0.50
has_valueMethod · 0.45

Tested by

no test coverage detected