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

Function GunMiss

TombEngine/Game/people.cpp:87–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87short GunMiss(int x, int y, int z, short velocity, short yRot, short roomNumber)
88{
89 auto pos = GameVector(
90 LaraItem->Pose.Position.x + ((GetRandomControl() - 0x4000) << 9) / 0x7FFF,
91 LaraItem->Floor - 128,
92 LaraItem->Pose.Position.z + ((GetRandomControl() - 0x4000) << 9) / 0x7FFF,
93 LaraItem->RoomNumber);
94
95 pos.y = GetPointCollision(pos.ToVector3i(), pos.RoomNumber).GetFloorHeight();
96
97 Ricochet(Pose(pos.ToVector3i()));
98 SpawnDecal(pos.ToVector3(), pos.RoomNumber, DecalType::BulletHole);
99 return GunShot(x, y, z, velocity, yRot, roomNumber);
100}
101
102short GunHit(int x, int y, int z, short velocity, short yRot, short roomNumber)
103{

Callers

nothing calls this directly

Calls 10

GetRandomControlFunction · 0.85
GetPointCollisionFunction · 0.85
RicochetFunction · 0.85
SpawnDecalFunction · 0.85
GunShotFunction · 0.85
PoseClass · 0.70
GameVectorClass · 0.50
GetFloorHeightMethod · 0.45
ToVector3iMethod · 0.45
ToVector3Method · 0.45

Tested by

no test coverage detected