MCPcopy Create free account
hub / github.com/OpenDUNE/OpenDUNE / Object_Script_Variable4_Clear

Function Object_Script_Variable4_Clear

src/object.c:78–89  ·  view source on GitHub ↗

* Clear variable4 in a safe (and recursive) way from an object. * @param object The Oject to clear variable4 of. */

Source from the content-addressed store, hash-verified

76 * @param object The Oject to clear variable4 of.
77 */
78void Object_Script_Variable4_Clear(Object *object)
79{
80 Object *objectVariable;
81 uint16 encoded = object->script.variables[4];
82
83 if (encoded == 0) return;
84
85 objectVariable = Tools_Index_GetObject(encoded);
86
87 Object_Script_Variable4_Set(object, 0);
88 Object_Script_Variable4_Set(objectVariable, 0);
89}
90
91/**
92 * Get the object on the given packed tile.

Callers 13

Structure_UntargetMeFunction · 0.85
Unit_UntargetMeFunction · 0.85
Unit_EnterStructureFunction · 0.85
Script_Unit_PickupFunction · 0.85
Script_Unit_Unknown2552Function · 0.85
Script_Unit_Unknown2BD5Function · 0.85

Calls 2

Tools_Index_GetObjectFunction · 0.85

Tested by

no test coverage detected