UFO: Alien Invasion
Loading...
Searching...
No Matches
g_spawn.h
Go to the documentation of this file.
1
5
6/*
7All original material Copyright (C) 2002-2025 UFO: Alien Invasion.
8
9Original file from Quake 2 v3.21: quake2-2.31/game/g_spawn.c
10Copyright (C) 1997-2001 Id Software, Inc.
11
12This program is free software; you can redistribute it and/or
13modify it under the terms of the GNU General Public License
14as published by the Free Software Foundation; either version 2
15of the License, or (at your option) any later version.
16
17This program is distributed in the hope that it will be useful,
18but WITHOUT ANY WARRANTY; without even the implied warranty of
19MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20
21See the GNU General Public License for more details.
22
23You should have received a copy of the GNU General Public License
24along with this program; if not, write to the Free Software
25Foundation, 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
35void G_SpawnEntities(const char* mapname, bool day, const char* entities);
36Edict* G_Spawn(const char* classname = nullptr);
37void G_SpawnSmokeField(const vec3_t vec, const char* particle, int rounds, int damage, vec_t radius);
38void G_SpawnFireField(const vec3_t vec, const char* particle, int rounds, int damage, vec_t radius);
39void G_SpawnStunSmokeField(const vec3_t vec, const char* particle, int rounds, int damage, vec_t radius);
40Edict* G_SpawnFloor(const pos3_t pos);
41Edict* G_SpawnParticle(const vec3_t origin, int spawnflags, const char* particle);
entity_t entities[MAX_MAP_ENTITIES]
Definition bspfile.cpp:395
Local definitions for game module.
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
void G_SpawnFireField(const vec3_t vec, const char *particle, int rounds, int damage, vec_t radius)
Definition g_spawn.cpp:521
Edict * G_SpawnFloor(const pos3_t pos)
Spawns a new entity at the floor.
Definition g_spawn.cpp:535
Edict * G_Spawn(const char *classname=nullptr)
Either finds a free edict, or allocates a new one.
Definition g_spawn.cpp:403
void G_SpawnStunSmokeField(const vec3_t vec, const char *particle, int rounds, int damage, vec_t radius)
Definition g_spawn.cpp:526
Edict * G_SpawnParticle(const vec3_t origin, int spawnflags, const char *particle)
Definition g_spawn.cpp:551
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
pos_t pos3_t[3]
Definition ufotypes.h:58
float vec_t
Definition ufotypes.h:37
vec_t vec3_t[3]
Definition ufotypes.h:39