UFO: Alien Invasion
|
Brings new objects into the world. More...
#include "g_local.h"
Go to the source code of this file.
Macros | |
#define | G_ValidMessage(ent) ((ent)->message && ((ent)->message[0] == '_' || strstr((ent)->message, "*msgid:") != nullptr)) |
Functions | |
void | G_SpawnEntities (const char *mapname, bool day, const char *entities) |
Creates a server's entity / program execution context by parsing textual entity definitions out of an ent file. More... | |
Edict * | G_Spawn (const char *classname=nullptr) |
Either finds a free edict, or allocates a new one. More... | |
void | G_SpawnSmokeField (const vec3_t vec, const char *particle, int rounds, int damage, vec_t radius) |
Spawns a smoke field that is available for some rounds. More... | |
void | G_SpawnFireField (const vec3_t vec, const char *particle, int rounds, int damage, vec_t radius) |
void | G_SpawnStunSmokeField (const vec3_t vec, const char *particle, int rounds, int damage, vec_t radius) |
Edict * | G_SpawnFloor (const pos3_t pos) |
Spawns a new entity at the floor. More... | |
Edict * | G_SpawnParticle (const vec3_t origin, int spawnflags, const char *particle) |
Brings new objects into the world.
Definition in file g_spawn.h.
#define G_ValidMessage | ( | ent | ) | ((ent)->message && ((ent)->message[0] == '_' || strstr((ent)->message, "*msgid:") != nullptr)) |
Definition at line 33 of file g_spawn.h.
Referenced by G_MissionThink(), Message_Use(), and SP_misc_message().
Edict* G_Spawn | ( | const char * | classname | ) |
Either finds a free edict, or allocates a new one.
Definition at line 403 of file g_spawn.cpp.
References ACTOR_SIZE_NORMAL, Edict::classname, Edict::fieldSize, G_EdictsGetNewEdict(), G_EdictsGetNumber(), gi, Edict::inuse, Edict::number, and Edict::setActive().
Referenced by G_SpawnEntities(), G_SpawnFieldPart(), G_SpawnFloor(), G_SpawnParticle(), and G_TriggerSpawn().
void G_SpawnEntities | ( | const char * | mapname, |
bool | day, | ||
const char * | entities | ||
) |
Creates a server's entity / program execution context by parsing textual entity definitions out of an ent file.
Definition at line 331 of file g_spawn.cpp.
References level_locals_s::activeTeam, level_locals_s::actualRound, AI_CreatePlayer(), ai_multiplayeraliens, Edict::calcOrigin(), Com_Parse(), Com_Printf(), level_locals_s::day, ED_CallSpawn(), ED_ParseEdict(), G_EdictsInit(), G_FindEdictGroups(), G_FreeTags, G_IsSinglePlayer, G_ReactionFireTargetsInit(), G_ResetClientData(), G_Spawn(), G_TagMalloc, game, InventoryInterface::GetUsedSlots(), gi, level_locals_s::hurtAliens, cvar_s::integer, game_locals_s::invi, level, level_locals_s::mapname, Edict::mapNum, level_locals_s::num_spawnpoints, OBJZERO, Edict::origin, level_locals_s::pathingMap, Edict::pos, Q_strncpyz(), Edict::solid, SOLID_BBOX, sv_hurtaliens, TAG_LEVEL, TEAM_ALIEN, TEAM_CIVILIAN, TEAM_NO_ACTIVE, and VecToPos.
Referenced by GetGameAPI().
void G_SpawnFireField | ( | const vec3_t | vec, |
const char * | particle, | ||
int | rounds, | ||
int | damage, | ||
vec_t | radius | ||
) |
Definition at line 521 of file g_spawn.cpp.
References ET_FIRE, and G_SpawnFieldGroup().
Referenced by G_ClientShoot().
Spawns a new entity at the floor.
Definition at line 535 of file g_spawn.cpp.
References ACTOR_SIZE_NORMAL, Edict::calcOrigin(), ET_ITEM, Edict::fieldSize, G_Spawn(), gi, Edict::pos, Edict::type, and VectorCopy.
Referenced by G_ActorInvMove(), G_AddItemToFloor(), G_InventoryToFloor(), and G_SpawnItemOnFloor().
This is only for particles that are spawned during a match - not for map particles.
Definition at line 551 of file g_spawn.cpp.
References ET_PARTICLE, G_CheckVis(), G_Spawn(), Edict::origin, Edict::particle, Edict::pos, Edict::spawnflags, Edict::type, VecToPos, and VectorCopy.
Referenced by Destroy_Breakable(), Destroy_Camera(), G_MissionThink(), G_ShootSingle(), G_SpawnField(), G_SplashDamage(), and Think_NextMapTrigger().
void G_SpawnSmokeField | ( | const vec3_t | vec, |
const char * | particle, | ||
int | rounds, | ||
int | damage, | ||
vec_t | radius | ||
) |
Spawns a smoke field that is available for some rounds.
[in] | vec | The position in the world that is the center of the smoke field |
[in] | particle | The id of the particle (see ptl_*.ufo script files in base/ufos) |
[in] | rounds | The number of rounds the particle will last |
[in] | damage | The amount of damage this field will cause when touched by an actor. |
[in] | radius | The max distance of a cell from the center to get a particle |
Definition at line 516 of file g_spawn.cpp.
References ET_SMOKE, and G_SpawnFieldGroup().
Referenced by G_ClientShoot().
void G_SpawnStunSmokeField | ( | const vec3_t | vec, |
const char * | particle, | ||
int | rounds, | ||
int | damage, | ||
vec_t | radius | ||
) |
Definition at line 526 of file g_spawn.cpp.
References ET_SMOKESTUN, and G_SpawnFieldGroup().
Referenced by G_ClientShoot().