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

Method net_Spawn

ogsr_engine/xrGame/Car.cpp:160–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

158}
159
160BOOL CCar::net_Spawn(CSE_Abstract* DC)
161{
162#ifdef DEBUG
163 InitDebug();
164#endif
165 CSE_Abstract* e = (CSE_Abstract*)(DC);
166 CSE_ALifeCar* co = smart_cast<CSE_ALifeCar*>(e);
167 BOOL R = inherited::net_Spawn(DC);
168
169 PKinematics(Visual())->CalculateBones_Invalidate();
170 PKinematics(Visual())->CalculateBones();
171
172 CPHSkeleton::Spawn(e);
173 setEnabled(TRUE);
174 setVisible(TRUE);
175 PKinematics(Visual())->CalculateBones_Invalidate();
176 PKinematics(Visual())->CalculateBones();
177 m_fSaveMaxRPM = m_max_rpm;
178 SetfHealth(co->health);
179
180 if (!g_Alive())
181 b_exploded = true;
182 else
183 b_exploded = false;
184
185 CDamagableItem::RestoreEffect();
186
187 CInifile* pUserData = PKinematics(Visual())->LL_UserData();
188 if (pUserData->section_exist("destroyed"))
189 CPHDestroyable::Load(pUserData, "destroyed");
190 if (pUserData->section_exist("mounted_weapon_definition"))
191 m_car_weapon = xr_new<CCarWeapon>(this);
192
193 if (pUserData->section_exist("visual_memory_definition"))
194 {
195 m_memory = xr_new<car_memory>(this);
196 m_memory->reload(pUserData->r_string("visual_memory_definition", "section"));
197 }
198
199 renderable.visual->ignore_optimization = true;
200
201 return (CScriptEntity::net_Spawn(DC) && R);
202}
203
204void CCar::ActorObstacleCallback(bool& do_colide, bool bo1, dContact& c, SGameMtl* material_1, SGameMtl* material_2)
205{

Callers 1

g_sv_SpawnMethod · 0.45

Calls 11

PKinematicsFunction · 0.85
VisualFunction · 0.85
SetfHealthFunction · 0.85
g_AliveFunction · 0.85
LoadFunction · 0.85
LL_UserDataMethod · 0.80
section_existMethod · 0.80
CalculateBonesMethod · 0.45
reloadMethod · 0.45
r_stringMethod · 0.45

Tested by

no test coverage detected