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

Function HitWinston

TombEngine/Objects/TR3/Entity/Winston.cpp:308–322  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

306 }
307
308 void HitWinston(ItemInfo& target, ItemInfo& source, std::optional<GameVector> pos, int damage, bool isExplosive, int jointIndex)
309 {
310 const auto& object = Objects[target.ObjectNumber];
311
312 if (pos.has_value())
313 {
314 DoItemHit(&target, damage, isExplosive, false);
315
316 if (object.hitEffect == HitEffect::Richochet)
317 {
318 TriggerRicochetSpark(*pos, source.Pose.Orientation.y, false);
319 SoundEffect(SFX_TR3_WINSTON_CUPS, &target.Pose);
320 }
321 }
322 }
323}

Callers

nothing calls this directly

Calls 4

DoItemHitFunction · 0.85
SoundEffectFunction · 0.85
TriggerRicochetSparkFunction · 0.50
has_valueMethod · 0.45

Tested by

no test coverage detected