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

Function Script_Unit_Unknown2552

src/script/unit.c:1533–1550  ·  view source on GitHub ↗

* Unknown function 2552. * * Stack: *none*. * * @param script The script engine to operate on. * @return The value 0. Always. */

Source from the content-addressed store, hash-verified

1531 * @return The value 0. Always.
1532 */
1533uint16 Script_Unit_Unknown2552(ScriptEngine *script)
1534{
1535 Unit *u;
1536 Unit *u2;
1537
1538 VARIABLE_NOT_USED(script);
1539
1540 u = g_scriptCurrentUnit;
1541 if (u->o.script.variables[4] == 0) return 0;
1542
1543 u2 = Tools_Index_GetUnit(u->o.script.variables[4]);
1544 if (u2 == NULL || u2->o.type != UNIT_CARRYALL) return 0;
1545
1546 Object_Script_Variable4_Clear(&u->o);
1547 u2->targetMove = 0;
1548
1549 return 0;
1550}
1551
1552/**
1553 * Finds a structure.

Callers

nothing calls this directly

Calls 2

Tools_Index_GetUnitFunction · 0.85

Tested by

no test coverage detected