* Get orientation of a unit. * * Stack: 1 - An encoded index. * * @param script The script engine to operate on. * @return The orientation of the unit. */
| 200 | * @return The orientation of the unit. |
| 201 | */ |
| 202 | uint16 Script_General_GetOrientation(ScriptEngine *script) |
| 203 | { |
| 204 | Unit *u; |
| 205 | |
| 206 | u = Tools_Index_GetUnit(STACK_PEEK(1)); |
| 207 | |
| 208 | if (u == NULL) return 128; |
| 209 | |
| 210 | return u->orientation[0].current; |
| 211 | } |
| 212 | |
| 213 | /** |
| 214 | * Counts how many unit of the given type are owned by current object's owner. |
nothing calls this directly
no test coverage detected