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

Method attach_Actor

ogsr_engine/xrGame/Car.cpp:649–676  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

647}
648
649bool CCar::attach_Actor(CGameObject* actor)
650{
651 if (CPHDestroyable::Destroyed())
652 return false;
653 CHolderCustom::attach_Actor(actor);
654
655 IKinematics* K = smart_cast<IKinematics*>(Visual());
656 CInifile* ini = K->LL_UserData();
657 int id;
658 if (ini->line_exist("car_definition", "driver_place"))
659 id = K->LL_BoneID(ini->r_string("car_definition", "driver_place"));
660 else
661 {
662 Owner()->setVisible(0);
663 id = K->LL_GetBoneRoot();
664 }
665 CBoneInstance& instance = K->LL_GetBoneInstance(u16(id));
666 m_sits_transforms.set(instance.mTransform);
667 actor->XFORM().mul_43(XFORM(), m_sits_transforms);
668
669 OnCameraChange(ectFirst);
670 PPhysicsShell()->Enable();
671 PPhysicsShell()->add_ObjectContactCallback(ActorObstacleCallback);
672 processing_activate();
673 ReleaseBreaks();
674
675 return true;
676}
677
678bool CCar::is_Door(u16 id, xr_map<u16, SDoor>::iterator& i)
679{

Callers 2

attach_VehicleMethod · 0.45
use_MountedWeaponMethod · 0.45

Calls 13

VisualFunction · 0.85
XFORMFunction · 0.85
LL_UserDataMethod · 0.80
line_existMethod · 0.80
LL_BoneIDMethod · 0.80
LL_GetBoneRootMethod · 0.80
mul_43Method · 0.80
OwnerFunction · 0.70
r_stringMethod · 0.45
setVisibleMethod · 0.45
setMethod · 0.45
EnableMethod · 0.45

Tested by

no test coverage detected