/** * @brief info_alien_start (1 0 0) (-16 -16 -24) (16 16 32) * Starting point for a single player alien. */ static void SP_alien_start (edict_t *ent) { /* deactivateable in multiplayer */ if (sv_maxclients->integer > 1 && !ai_numactors->integer) { G_FreeEdict(ent); return; } ent->team = TEAM_ALIEN; /* set stats */ ent->STUN = 0; ent->HP = MAX_HP; /* hurt aliens in ufo crash missions (5%: almost dead, 15%: wounded, 30%: stunned) */ if (level.hurtAliens) { const float random = frand(); if (random <= .05f) { ent->STUN = 50; ent->HP = 5; } else if (random <= .15f) { ent->STUN = 30; ent->HP /= 2; } else if (random <= .3f) { ent->STUN = 75; } } G_ActorSpawn(ent); }
/** * @brief info_human_start (1 0 0) (-16 -16 -24) (16 16 32) * Starting point for a single player human. */ static void SP_human_start (edict_t *ent) { /* only used in single player */ if (sv_maxclients->integer > 1) { G_FreeEdict(ent); return; } ent->team = TEAM_PHALANX; ent->STUN = 0; ent->HP = MAX_HP; G_ActorSpawn(ent); }
/** * @brief info_human_start (1 0 0) (-16 -16 -24) (16 16 32) * Starting point for a single player human. */ static void SP_human_start (Edict* ent) { /* only used in single player */ if (G_IsMultiPlayer()) { G_FreeEdict(ent); return; } ent->team = TEAM_PHALANX; ent->STUN = 0; ent->HP = INITIAL_HP; G_ActorSpawn(ent); }
/** * @brief info_civilian_start (0 1 1) (-16 -16 -24) (16 16 32) * Starting point for a civilian. */ static void SP_civilian_start (edict_t *ent) { /* deactivateable in multiplayer */ if (sv_maxclients->integer > 1 && !ai_numcivilians->integer) { G_FreeEdict(ent); return; } ent->team = TEAM_CIVILIAN; /* set stats */ ent->STUN = 99; /** @todo Does anybody know _why_ this is set to 99? */ ent->HP = MAX_HP; ent->count = 100; /* current waypoint */ G_ActorSpawn(ent); }
/** * @brief info_alien_start (1 0 0) (-16 -16 -24) (16 16 32) * Starting point for a single player alien. */ static void SP_alien_start (edict_t *ent) { /* deactivateable in multiplayer */ if (sv_maxclients->integer > 1 && !ai_numactors->integer) { G_FreeEdict(ent); return; } ent->team = TEAM_ALIEN; /* set stats */ ent->STUN = 0; ent->HP = MAX_HP; G_ActorSpawn(ent); }
/** * @brief info_alien_start (1 0 0) (-16 -16 -24) (16 16 32) * Starting point for a single player alien. */ static void SP_alien_start (Edict* ent) { /* deactivateable in multiplayer */ if (G_IsMultiPlayer() && !ai_multiplayeraliens->integer) { G_FreeEdict(ent); return; } ent->team = TEAM_ALIEN; /* set stats */ ent->STUN = 0; ent->HP = INITIAL_HP; G_ActorSpawn(ent); }
/** * @brief info_player_start (1 0 0) (-16 -16 -24) (16 16 32) * Starting point for a player. * "team" the number of the team for this player starting point * "0" is reserved for civilians and critters (use info_civilian_start instead) */ static void SP_player_start (edict_t *ent) { /* only used in multi player */ if (sv_maxclients->integer == 1) { G_FreeEdict(ent); return; } /** @todo Wrong place here */ /* maybe there are already the max soldiers allowed per team connected */ if (sv_maxsoldiersperteam->integer > level.num_spawnpoints[ent->team]) { ent->STUN = 0; ent->HP = MAX_HP; G_ActorSpawn(ent); } else G_FreeEdict(ent); }