UFO: Alien Invasion
Loading...
Searching...
No Matches
g_edicts.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_utils.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
34void G_EdictsInit(void);
36Edict* G_EdictDuplicate(const Edict* edict);
37int G_EdictsGetNumber(const Edict* ent);
38bool G_EdictsIsValidNum(const int idx);
39Edict* G_EdictsGetByNum(const int num);
41Edict* G_EdictsGetNext(Edict* lastEnt);
45Actor* G_EdictsGetNextLivingActorOfTeam(Actor* lastEnt, const int team);
46Actor* G_EdictsGetActorByUCN(const int ucn, const int team);
49Edict* G_EdictsFindTargetEntity(const char* target);
50void G_EdictsThink(void);
An Edict of type Actor.
Definition g_edict.h:348
Edict * G_EdictsFindTargetEntity(const char *target)
Searches the edict that has the given target as targetname set.
Definition g_edicts.cpp:290
Edict * G_EdictsGetFirst(void)
Returns the first entity.
Definition g_edicts.cpp:98
Edict * G_EdictsConstruct(void)
Allocate space for the entity pointers.
Definition g_edicts.cpp:39
Actor * G_EdictsGetNextLivingActorOfTeam(Actor *lastEnt, const int team)
Iterate through the living actor entities of the given team.
Definition g_edicts.cpp:216
Edict * G_EdictsGetTriggerNextMaps(Edict *lastEnt)
Iterator through all the trigger_nextmap edicts.
Definition g_edicts.cpp:181
Actor * G_EdictsGetActorByUCN(const int ucn, const int team)
Searches an actor by a unique character number.
Definition g_edicts.cpp:254
Actor * G_EdictsGetNextActor(Actor *lastEnt)
Iterate through the actor entities (even the dead!).
Definition g_edicts.cpp:231
Edict * G_EdictsGetNewEdict(void)
Find an entity that is not in use.
Definition g_edicts.cpp:141
Actor * G_EdictsGetNextLivingActor(Actor *lastEnt)
Iterate through the living actor entities.
Definition g_edicts.cpp:196
Edict * G_EdictsGetNext(Edict *lastEnt)
Iterate through the list of entities.
Definition g_edicts.cpp:107
Edict * G_EdictDuplicate(const Edict *edict)
Definition g_edicts.cpp:128
int G_EdictsGetNumber(const Edict *ent)
Get an entity's ID number.
Definition g_edicts.cpp:60
Edict * G_EdictsGetNextInUse(Edict *lastEnt)
Iterate through the entities that are in use.
Definition g_edicts.cpp:166
void G_EdictsThink(void)
Called every frame to let the edicts tick.
Definition g_edicts.cpp:306
Actor * G_EdictsGetLivingActorFromPos(const pos3_t pos)
Searches an actor at the given grid location.
Definition g_edicts.cpp:270
Edict * G_EdictsGetByNum(const int num)
Get an entity by it's number.
Definition g_edicts.cpp:83
void G_EdictsInit(void)
Reset the entity pointers for eg. a new game.
Definition g_edicts.cpp:48
bool G_EdictsIsValidNum(const int idx)
Check if the given number could point to an existing entity.
Definition g_edicts.cpp:72
Local definitions for game module.
pos_t pos3_t[3]
Definition ufotypes.h:58