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

Method InitServerObject

ogsr_engine/xrGame/PHSkeleton.cpp:467–496  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

465}
466
467void CPHSkeleton::InitServerObject(CSE_Abstract* D)
468{
469 CPhysicsShellHolder* obj = PPhysicsShellHolder();
470 CSE_ALifeDynamicObject* l_tpALifeDynamicObject = smart_cast<CSE_ALifeDynamicObject*>(D);
471 R_ASSERT(l_tpALifeDynamicObject);
472 CSE_ALifePHSkeletonObject* l_tpALifePhysicObject = smart_cast<CSE_ALifePHSkeletonObject*>(D);
473 R_ASSERT(l_tpALifePhysicObject);
474
475 l_tpALifePhysicObject->m_tGraphID = obj->ai_location().game_vertex_id();
476 l_tpALifeDynamicObject->m_tNodeID = obj->ai_location().level_vertex_id();
477 l_tpALifePhysicObject->set_visual(*obj->cNameVisual());
478
479 l_tpALifePhysicObject->source_id = u16(obj->ID());
480 l_tpALifePhysicObject->startup_animation = m_startup_anim;
481 D->s_name = "ph_skeleton_object"; //*cNameSect()
482 D->set_name_replace("");
483 D->s_gameid = u8(GameID());
484 D->s_RP = 0xff;
485 D->ID = 0xffff;
486 D->ID_Parent = 0xffff; // u16(ID());//
487 D->ID_Phantom = 0xffff;
488 D->o_Position = obj->Position();
489 if (ai().get_alife())
490 l_tpALifeDynamicObject->m_tGraphID = ai().game_graph().current_level_vertex();
491 else
492 l_tpALifeDynamicObject->m_tGraphID = 0xffff;
493 obj->XFORM().getHPB(D->o_Angle);
494 D->s_flags.assign(M_SPAWN_OBJECT_LOCAL);
495 D->RespawnTime = 0;
496}
497
498void CPHSkeleton::SetNotNeedSave() { m_flags.set(CSE_PHSkeleton::flNotSave, TRUE); }
499

Callers

nothing calls this directly

Calls 9

GameIDFunction · 0.85
set_visualMethod · 0.80
PositionMethod · 0.80
get_alifeMethod · 0.80
getHPBMethod · 0.80
PPhysicsShellHolderFunction · 0.70
game_vertex_idMethod · 0.45
level_vertex_idMethod · 0.45
assignMethod · 0.45

Tested by

no test coverage detected