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

Method create_physic_shell

ogsr_engine/xrGame/Weapon.cpp:1800–1813  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1798}
1799
1800void CWeapon::create_physic_shell()
1801{
1802 // xrKrodin: Временный? "фикс" для оружия из ганслингера, валяющегося на земле. По непонятным причинам (много костей или хз от чего ещё) в некоторых случаях при рассчетах
1803 // физики происходят краши в ode которые исправить невозможно.
1804 if (is_gunslinger_weapon || IS_OGSR_GA)
1805 {
1806 auto vis = smart_cast<IKinematics*>(Visual());
1807 auto& rootBoneData = vis->LL_GetData(vis->LL_GetBoneRoot());
1808 m_pPhysicsShell = P_build_SimpleShell(this, rootBoneData.mass, false);
1809 m_pPhysicsShell->SetMaterial(rootBoneData.game_mtl_idx);
1810 }
1811 else
1812 CPhysicsShellHolder::create_physic_shell();
1813}
1814
1815void CWeapon::activate_physic_shell() { CPhysicsShellHolder::activate_physic_shell(); }
1816

Callers

nothing calls this directly

Calls 4

VisualFunction · 0.85
P_build_SimpleShellFunction · 0.85
LL_GetBoneRootMethod · 0.80
SetMaterialMethod · 0.45

Tested by

no test coverage detected