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

Function Unit_Hide

src/unit.c:2107–2120  ·  view source on GitHub ↗

* Hide a unit from the viewport. Happens when a unit enters a structure or * gets picked up by a carry-all. * * @param unit The Unit to hide. */

Source from the content-addressed store, hash-verified

2105 * @param unit The Unit to hide.
2106 */
2107void Unit_Hide(Unit *unit)
2108{
2109 if (unit == NULL) return;
2110
2111 unit->o.flags.s.bulletIsBig = true;
2112 Unit_UpdateMap(0, unit);
2113 unit->o.flags.s.bulletIsBig = false;
2114
2115 Script_Reset(&unit->o.script, g_scriptUnit);
2116 Unit_UntargetMe(unit);
2117
2118 unit->o.flags.s.isNotOnMap = true;
2119 Unit_HouseUnitCount_Remove(unit);
2120}
2121
2122/**
2123 * Call a specified type of unit owned by the house to you.

Callers 2

Unit_EnterStructureFunction · 0.85
Script_Unit_PickupFunction · 0.85

Calls 4

Unit_UpdateMapFunction · 0.85
Script_ResetFunction · 0.85
Unit_UntargetMeFunction · 0.85

Tested by

no test coverage detected