* Clear variable4 in a safe (and recursive) way from an object. * @param object The Oject to clear variable4 of. */
| 76 | * @param object The Oject to clear variable4 of. |
| 77 | */ |
| 78 | void 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. |
no test coverage detected