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

Function Script_Unit_Stop

src/script/unit.c:358–371  ·  view source on GitHub ↗

* Stop the Unit. * * Stack: *none*. * * @param script The script engine to operate on. * @return The value 0. Always. */

Source from the content-addressed store, hash-verified

356 * @return The value 0. Always.
357 */
358uint16 Script_Unit_Stop(ScriptEngine *script)
359{
360 Unit *u;
361
362 VARIABLE_NOT_USED(script);
363
364 u = g_scriptCurrentUnit;
365
366 Unit_SetSpeed(u, 0);
367
368 Unit_UpdateMap(2, u);
369
370 return 0;
371}
372
373/**
374 * Set the speed of a Unit.

Callers

nothing calls this directly

Calls 2

Unit_SetSpeedFunction · 0.85
Unit_UpdateMapFunction · 0.85

Tested by

no test coverage detected