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

Function Script_Unit_ExplosionSingle

src/script/unit.c:533–541  ·  view source on GitHub ↗

* Make an explosion at the coordinates of the unit. * It does damage to the surrounding units based on the unit. * * Stack: 1 - Explosion type * * @param script The script engine to operate on. * @return The value 0. Always. */

Source from the content-addressed store, hash-verified

531 * @return The value 0. Always.
532 */
533uint16 Script_Unit_ExplosionSingle(ScriptEngine *script)
534{
535 Unit *u;
536
537 u = g_scriptCurrentUnit;
538
539 Map_MakeExplosion(STACK_PEEK(1), u->o.position, g_table_unitInfo[u->o.type].o.hitpoints, Tools_Index_Encode(u->o.index, IT_UNIT));
540 return 0;
541}
542
543/**
544 * Make 8 explosions: 1 at the unit, and 7 around him.

Callers

nothing calls this directly

Calls 2

Map_MakeExplosionFunction · 0.85
Tools_Index_EncodeFunction · 0.85

Tested by

no test coverage detected