* 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. */
| 2105 | * @param unit The Unit to hide. |
| 2106 | */ |
| 2107 | void 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. |
no test coverage detected