* Unknown function 0A81. * * Stack: *none* * * @param script The script engine to operate on. * @return unknown. */
| 161 | * @return unknown. |
| 162 | */ |
| 163 | uint16 Script_Structure_Unknown0A81(ScriptEngine *script) |
| 164 | { |
| 165 | uint16 structureIndex; |
| 166 | Structure *s; |
| 167 | Unit *u; |
| 168 | |
| 169 | VARIABLE_NOT_USED(script); |
| 170 | |
| 171 | s = g_scriptCurrentStructure; |
| 172 | |
| 173 | structureIndex = Tools_Index_Encode(s->o.index, IT_STRUCTURE); |
| 174 | |
| 175 | u = Tools_Index_GetUnit(s->o.script.variables[4]); |
| 176 | if (u != NULL) { |
| 177 | if (structureIndex == u->o.script.variables[4]) return s->o.script.variables[4]; |
| 178 | Object_Script_Variable4_Clear(&u->o); |
| 179 | } |
| 180 | |
| 181 | Object_Script_Variable4_Clear(&s->o); |
| 182 | |
| 183 | return 0; |
| 184 | } |
| 185 | |
| 186 | /** |
| 187 | * Find a UnitType and make it go to the current structure. In general, type |
nothing calls this directly
no test coverage detected