UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
g_mission.cpp File Reference

Mission related code - king of the hill and so on. More...

#include "g_mission.h"
#include "g_actor.h"
#include "g_client.h"
#include "g_edicts.h"
#include "g_inventory.h"
#include "g_match.h"
#include "g_spawn.h"
#include "g_utils.h"

Go to the source code of this file.

Functions

void G_MissionAddVictoryMessage (const char *message)
 
static const char * G_MissionGetTeamString (const int team)
 
bool G_MissionTouch (Edict *self, Edict *activator)
 Mission trigger. More...
 
void G_MissionReset (Edict *self, Edict *activator)
 
bool G_MissionUse (Edict *self, Edict *activator)
 Mission trigger use function. More...
 
static bool G_MissionIsTouched (Edict *self)
 
void G_MissionThink (Edict *self)
 

Detailed Description

Mission related code - king of the hill and so on.

Definition in file g_mission.cpp.

Function Documentation

void G_MissionAddVictoryMessage ( const char *  message)

Definition at line 38 of file g_mission.cpp.

References CS_VICTORY_CONDITIONS, and gi.

Referenced by SP_misc_mission().

static const char* G_MissionGetTeamString ( const int  team)
inlinestatic

Definition at line 43 of file g_mission.cpp.

References TEAM_ALIEN, TEAM_PHALANX, and va().

Referenced by G_MissionReset(), and G_MissionTouch().

static bool G_MissionIsTouched ( Edict self)
static

Definition at line 173 of file g_mission.cpp.

References linkedList_t::data, G_IsDead, and linkedList_t::next.

Referenced by G_MissionThink().

void G_MissionReset ( Edict self,
Edict activator 
)
bool G_MissionTouch ( Edict self,
Edict activator 
)

Mission trigger.

Todo:
use level.nextmap to spawn another map when every living actor has touched the mission trigger
Note
Don't set a client action here - otherwise the movement event might be corrupted

Definition at line 53 of file g_mission.cpp.

References _, level_locals_s::actualRound, Edict::chr, CID_FLOOR, linkedList_t::data, Item::def(), Container::def(), G_ActorInvMove(), G_IsCivilian, G_IsDead, G_IsLivingActor(), G_MissionGetTeamString(), Inventory::getNextCont(), Container::getNextItem(), Edict::getTeam(), gi, objDef_s::id, character_s::inv, INVDEF, level, makeActor(), objDef_s::name, linkedList_t::next, NONE, PRINT_HUD, and Q_streq.

Referenced by SP_misc_mission().

bool G_MissionUse ( Edict self,
Edict activator 
)

Mission trigger use function.

Definition at line 151 of file g_mission.cpp.

References Edict::destroy, G_EdictsFindTargetEntity(), G_FreeEdict(), gi, Edict::HP, and Edict::use.

Referenced by SP_misc_mission().