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

Method Load

ogsr_engine/xrGame/Actor.cpp:248–427  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246}
247
248void CActor::Load(LPCSTR section)
249{
250 // Msg ("Loading actor: %s",section);
251 inherited::Load(section);
252 material().Load(section);
253 CInventoryOwner::Load(section);
254 m_location_manager->Load(section);
255
256 OnDifficultyChanged();
257 //////////////////////////////////////////////////////////////////////////
258 ISpatial* self = smart_cast<ISpatial*>(this);
259 if (self)
260 {
261 self->spatial.type |= STYPE_VISIBLEFORAI;
262 self->spatial.type &= ~STYPE_REACTTOSOUND;
263 }
264 //////////////////////////////////////////////////////////////////////////
265
266 // m_PhysicMovementControl: General
267 // m_PhysicMovementControl->SetParent (this);
268 Fbox bb;
269 Fvector vBOX_center, vBOX_size;
270 // m_PhysicMovementControl: BOX
271 vBOX_center = pSettings->r_fvector3(section, "ph_box2_center");
272 vBOX_size = pSettings->r_fvector3(section, "ph_box2_size");
273 bb.set(vBOX_center, vBOX_center);
274 bb.grow(vBOX_size);
275 character_physics_support()->movement()->SetBox(2, bb);
276
277 if (pSettings->line_exist(section, "ph_box4_center") && pSettings->line_exist(section, "ph_box4_size"))
278 {
279 vBOX_center = pSettings->r_fvector3(section, "ph_box4_center");
280 vBOX_size = pSettings->r_fvector3(section, "ph_box4_size");
281 bb.set(vBOX_center, vBOX_center);
282 bb.grow(vBOX_size);
283 character_physics_support()->movement()->SetBox(4, bb);
284 }
285 else
286 character_physics_support()->movement()->SetBox(4, bb);
287
288 // m_PhysicMovementControl: BOX
289 vBOX_center = pSettings->r_fvector3(section, "ph_box1_center");
290 vBOX_size = pSettings->r_fvector3(section, "ph_box1_size");
291 bb.set(vBOX_center, vBOX_center);
292 bb.grow(vBOX_size);
293 character_physics_support()->movement()->SetBox(1, bb);
294
295 if (pSettings->line_exist(section, "ph_box3_center") && pSettings->line_exist(section, "ph_box3_size"))
296 {
297 vBOX_center = pSettings->r_fvector3(section, "ph_box3_center");
298 vBOX_size = pSettings->r_fvector3(section, "ph_box3_size");
299 bb.set(vBOX_center, vBOX_center);
300 bb.grow(vBOX_size);
301 character_physics_support()->movement()->SetBox(3, bb);
302 }
303 else
304 character_physics_support()->movement()->SetBox(3, bb);
305

Callers 1

CActorMethod · 0.45

Calls 15

LoadFunction · 0.85
g_cafHitType2StringFunction · 0.85
_GetItemCountFunction · 0.85
_GetItemFunction · 0.85
deg2radFunction · 0.85
movementMethod · 0.80
line_existMethod · 0.80
SetCrashSpeedsMethod · 0.80
SetMassMethod · 0.80
SetJumpUpVelocityMethod · 0.80

Tested by

no test coverage detected