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

Function Unit_GetTeam

src/unit.c:577–582  ·  view source on GitHub ↗

* Gets the team of the given unit. * * @param u The unit to get the team of. * @return The team. */

Source from the content-addressed store, hash-verified

575 * @return The team.
576 */
577Team *Unit_GetTeam(Unit *u)
578{
579 if (u == NULL) return NULL;
580 if (u->team == 0) return NULL;
581 return Team_Get_ByIndex(u->team - 1);
582}
583
584/**
585 * ?? Sorts unit array and count enemy/allied units.

Callers 1

Map_MakeExplosionFunction · 0.85

Calls 1

Team_Get_ByIndexFunction · 0.85

Tested by

no test coverage detected