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

Function GuardHit

TombEngine/Objects/TR5/Entity/tr5_guard.cpp:1567–1583  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1565 }
1566
1567 void GuardHit(ItemInfo& target, ItemInfo& source, std::optional<GameVector> pos, int damage, bool isExplosive, int jointIndex)
1568 {
1569 if (pos.has_value())
1570 {
1571 if (jointIndex == GUARD_HEAD_MESH)
1572 {
1573 DoBloodSplat(pos->x, pos->y, pos->z, 10, source.Pose.Orientation.y, pos->RoomNumber);
1574 DoDamage(&target, INT_MAX);
1575
1576 return;
1577 }
1578 else
1579 DoBloodSplat(pos->x, pos->y, pos->z, 10, source.Pose.Orientation.y, pos->RoomNumber);
1580 }
1581
1582 DoItemHit(&target, damage, isExplosive);
1583 }
1584}

Callers

nothing calls this directly

Calls 4

DoBloodSplatFunction · 0.85
DoDamageFunction · 0.85
DoItemHitFunction · 0.85
has_valueMethod · 0.45

Tested by

no test coverage detected