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

Method InitServerObject

ogsr_engine/xrGame/PHDestroyable.cpp:75–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73};
74
75void CPHDestroyable::InitServerObject(CSE_Abstract* D)
76{
77 CPhysicsShellHolder* obj = PPhysicsShellHolder();
78 CSE_ALifeDynamicObjectVisual* l_tpALifeDynamicObject = smart_cast<CSE_ALifeDynamicObjectVisual*>(D);
79 VERIFY(l_tpALifeDynamicObject);
80
81 l_tpALifeDynamicObject->m_tGraphID = obj->ai_location().game_vertex_id();
82 l_tpALifeDynamicObject->m_tNodeID = obj->ai_location().level_vertex_id();
83
84 // l_tpALifePhysicObject->startup_animation=m_startup_anim;
85
86 D->set_name_replace("");
87 D->s_gameid = u8(GameID());
88 D->s_RP = 0xff;
89 D->ID = 0xffff;
90
91 D->ID_Phantom = 0xffff;
92 D->o_Position = obj->Position();
93 if (ai().get_alife())
94 l_tpALifeDynamicObject->m_tGraphID = ai().game_graph().current_level_vertex();
95 else
96 l_tpALifeDynamicObject->m_tGraphID = 0xffff;
97 obj->XFORM().getXYZ(D->o_Angle);
98 D->s_flags.assign(M_SPAWN_OBJECT_LOCAL);
99 D->RespawnTime = 0;
100}
101
102void CPHDestroyable::PhysicallyRemoveSelf()
103{

Callers

nothing calls this directly

Calls 8

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

Tested by

no test coverage detected