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

Method re_sync_anim

ogsr_engine/xrGame/player_hud.cpp:1455–1486  ·  view source on GitHub ↗

sync anim of other part to selected part (1 = sync to left hand anim; 2 = sync to right hand anim)

Source from the content-addressed store, hash-verified

1453
1454// sync anim of other part to selected part (1 = sync to left hand anim; 2 = sync to right hand anim)
1455void player_hud::re_sync_anim(u8 part)
1456{
1457 u32 bc = part == 1 ? m_model_2->LL_PartBlendsCount(part) : m_model->LL_PartBlendsCount(part);
1458 for (u32 bidx = 0; bidx < bc; ++bidx)
1459 {
1460 CBlend* BR = part == 1 ? m_model_2->LL_PartBlend(part, bidx) : m_model->LL_PartBlend(part, bidx);
1461 if (!BR)
1462 continue;
1463
1464 MotionID M = BR->motionID;
1465
1466 u16 pc = m_model->partitions().count(); // same on both armatures
1467 for (u16 pid = 0; pid < pc; ++pid)
1468 {
1469 if (pid == 0)
1470 {
1471 CBlend* B = m_model->PlayCycle(0, M, TRUE);
1472 B->timeCurrent = BR->timeCurrent;
1473 B->speed = BR->speed;
1474 B = m_model_2->PlayCycle(0, M, TRUE);
1475 B->timeCurrent = BR->timeCurrent;
1476 B->speed = BR->speed;
1477 }
1478 else if (pid != part)
1479 {
1480 CBlend* B = part == 1 ? m_model->PlayCycle(pid, M, TRUE) : m_model_2->PlayCycle(pid, M, TRUE);
1481 B->timeCurrent = BR->timeCurrent;
1482 B->speed = BR->speed;
1483 }
1484 }
1485 }
1486}
1487
1488void player_hud::GetLHandBoneOffsetPosDir(const shared_str& bone_name, Fvector& dest_pos, Fvector& dest_dir, const Fvector& offset)
1489{

Callers

nothing calls this directly

Calls 4

LL_PartBlendsCountMethod · 0.80
LL_PartBlendMethod · 0.80
PlayCycleMethod · 0.80
countMethod · 0.45

Tested by

no test coverage detected