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

Function Script_Unit_SetOrientation

src/script/unit.c:707–716  ·  view source on GitHub ↗

* Set the orientation of a unit. * * Stack: 1 - New orientation for unit. * * @param script The script engine to operate on. * @return The current orientation of the unit (it will move to the requested over time). */

Source from the content-addressed store, hash-verified

705 * @return The current orientation of the unit (it will move to the requested over time).
706 */
707uint16 Script_Unit_SetOrientation(ScriptEngine *script)
708{
709 Unit *u;
710
711 u = g_scriptCurrentUnit;
712
713 Unit_SetOrientation(u, (int8)STACK_PEEK(1), false, 0);
714
715 return u->orientation[0].current;
716}
717
718/**
719 * Rotate the unit to aim at the enemy.

Callers

nothing calls this directly

Calls 1

Unit_SetOrientationFunction · 0.85

Tested by

no test coverage detected