UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
g_spawn.h
Go to the documentation of this file.
1 
6 /*
7 All original material Copyright (C) 2002-2020 UFO: Alien Invasion.
8 
9 Original file from Quake 2 v3.21: quake2-2.31/game/g_spawn.c
10 Copyright (C) 1997-2001 Id Software, Inc.
11 
12 This program is free software; you can redistribute it and/or
13 modify it under the terms of the GNU General Public License
14 as published by the Free Software Foundation; either version 2
15 of the License, or (at your option) any later version.
16 
17 This program is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 
21 See the GNU General Public License for more details.
22 
23 You should have received a copy of the GNU General Public License
24 along with this program; if not, write to the Free Software
25 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 
27 */
28 
29 #pragma once
30 
31 #include "g_local.h"
32 
33 #define G_ValidMessage(ent) ((ent)->message && ((ent)->message[0] == '_' || strstr((ent)->message, "*msgid:") != nullptr))
34 
35 void G_SpawnEntities(const char* mapname, bool day, const char* entities);
36 Edict* G_Spawn(const char* classname = nullptr);
37 void G_SpawnSmokeField(const vec3_t vec, const char* particle, int rounds, int damage, vec_t radius);
38 void G_SpawnFireField(const vec3_t vec, const char* particle, int rounds, int damage, vec_t radius);
39 void G_SpawnStunSmokeField(const vec3_t vec, const char* particle, int rounds, int damage, vec_t radius);
40 Edict* G_SpawnFloor(const pos3_t pos);
41 Edict* G_SpawnParticle(const vec3_t origin, int spawnflags, const char* particle);
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...
Definition: g_spawn.cpp:331
voidpf uLong int origin
Definition: ioapi.h:45
float vec_t
Definition: ufotypes.h:37
Edict * G_Spawn(const char *classname=nullptr)
Either finds a free edict, or allocates a new one.
Definition: g_spawn.cpp:403
entity_t entities[MAX_MAP_ENTITIES]
Definition: bspfile.cpp:395
void G_SpawnFireField(const vec3_t vec, const char *particle, int rounds, int damage, vec_t radius)
Definition: g_spawn.cpp:521
void G_SpawnStunSmokeField(const vec3_t vec, const char *particle, int rounds, int damage, vec_t radius)
Definition: g_spawn.cpp:526
pos_t pos3_t[3]
Definition: ufotypes.h:58
Edict * G_SpawnFloor(const pos3_t pos)
Spawns a new entity at the floor.
Definition: g_spawn.cpp:535
Local definitions for game module.
Edict * G_SpawnParticle(const vec3_t origin, int spawnflags, const char *particle)
Definition: g_spawn.cpp:551
vec_t vec3_t[3]
Definition: ufotypes.h:39
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.
Definition: g_spawn.cpp:516
Definition: g_edict.h:45