MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / InterpolateBox

Method InterpolateBox

ogsr_engine/xrGame/PHMovementControl.cpp:1078–1088  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1076 // m_character->SetPosition(vPosition);
1077}
1078void CPHMovementControl::InterpolateBox(DWORD id, float k)
1079{
1080 if (m_dwCurBox == id)
1081 return;
1082 if (!m_character || !m_character->b_exist)
1083 return;
1084 dVector3 size = {aabb.x2 - aabb.x1, aabb.y2 - aabb.y1, aabb.z2 - aabb.z1};
1085 dVector3 to_size = {boxes[id].x2 - boxes[id].x1, boxes[id].y2 - boxes[id].y1, boxes[id].z2 - boxes[id].z1};
1086 dVectorInterpolate(size, to_size, k);
1087 m_character->SetBox(size);
1088}
1089void CPHMovementControl::ApplyHit(const Fvector& dir, const dReal P, ALife::EHitType hit_type)
1090{
1091 if (hit_type == ALife::eHitTypeExplosion || hit_type == ALife::eHitTypeWound)

Callers

nothing calls this directly

Calls 2

dVectorInterpolateFunction · 0.85
SetBoxMethod · 0.45

Tested by

no test coverage detected