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

Method reinit

ogsr_engine/xrGame/material_manager.cpp:38–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38void CMaterialManager::reinit()
39{
40 m_last_material_idx = GMLib.GetMaterialIdx("default");
41 m_step_id = 0;
42 m_run_mode = false;
43
44 CEntityAlive* entity_alive = smart_cast<CEntityAlive*>(m_object);
45 if (entity_alive)
46 {
47 if (!smart_cast<CBaseMonster*>(entity_alive)) // для мобов не нужно устанавливть реальный материал, у них нет эти настроек материалов
48 entity_alive->character_physics_support()->movement()->SetPLastMaterialIDX(&m_last_material_idx);
49
50 entity_alive->character_physics_support()->movement()->SetMaterial(m_my_material_idx);
51 }
52}
53
54void CMaterialManager::reload(LPCSTR section) {}
55

Callers

nothing calls this directly

Calls 4

movementMethod · 0.80
SetPLastMaterialIDXMethod · 0.45
SetMaterialMethod · 0.45

Tested by

no test coverage detected