MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / InitializeShiva

Function InitializeShiva

TombEngine/Objects/TR3/Entity/Shiva.cpp:254–269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

252 }
253
254 void InitializeShiva(short itemNumber)
255 {
256 auto& item = g_Level.Items[itemNumber];
257 item.Status = ITEM_NOT_ACTIVE; // Draw the statue from the start.
258
259 InitializeCreature(itemNumber);
260 SetAnimation(item, SHIVA_ANIM_INACTIVE);
261 item.ItemFlags[0] = 0; // Joint index when swapping mesh.
262 item.ItemFlags[1] = 1; // Immune state. true = immune to damage.
263 item.ItemFlags[2] = 1; // If 1, swap to stone. If 2, swap to normal.
264 item.ItemFlags[3] = 0; // If mesh is swapped to stone, then it's true. Otherwise false.
265
266 const auto& object = Objects[item.ObjectNumber];
267 for (int jointIndex = 0; jointIndex < object.nmeshes; jointIndex++)
268 SwapShivaMeshToStone(item, jointIndex, false);
269 }
270
271 void ShivaControl(short itemNumber)
272 {

Callers

nothing calls this directly

Calls 3

InitializeCreatureFunction · 0.85
SetAnimationFunction · 0.85
SwapShivaMeshToStoneFunction · 0.85

Tested by

no test coverage detected