Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
entities.hpp
Go to the documentation of this file.
1 #pragma once
2 #include "inexor/shared/cube_vector.hpp" // for vector
3 #include "inexor/shared/ents.hpp" // for entity (ptr only), ::I_BOOST
4 
5 struct fpsent;
6 struct packetbuf;
7 
8 
11 enum
12 {
18 };
19 
22 {
25 };
26 
27 namespace entities {
28 
30 inline bool delayspawn(int type)
31 {
32  switch(type)
33  {
34  case I_GREENARMOUR:
35  case I_YELLOWARMOUR:
36  case I_BOOST:
37  case I_QUAD:
38  return true;
39  }
40  return false;
41 }
42 
44 
45 extern const char *entmdlname(int type);
46 extern const char *itemname(int i);
47 extern int itemicon(int i);
48 
49 extern void preloadentities();
50 extern void renderentities();
51 extern void resettriggers();
52 extern void checktriggers();
53 extern void checkitems(fpsent *d);
54 extern void checkquad(int time, fpsent *d);
55 extern void resetspawns();
56 extern void spawnitems(bool force = false);
57 extern void putitems(packetbuf &p);
58 extern void setspawn(int i, bool on);
59 extern void teleport(int n, fpsent *d);
60 extern void pickupeffects(int n, fpsent *d);
61 extern void teleporteffects(fpsent *d, int tp, int td, bool local = true);
62 extern void jumppadeffects(fpsent *d, int jp, bool local = true);
63 
64 extern void repammo(fpsent *d, int type, bool local = true);
65 
66 extern void editent(int i, bool local);
67 extern const char *entnameinfo(entity &e);
68 extern const char *entname(int i);
69 extern int extraentinfosize();
70 extern void writeent(entity &e, char *buf);
71 extern void readent(entity &e, char *buf, int ver);
72 extern float dropheight(entity &e);
73 extern bool hasmapmodel(const extentity &e);
74 extern void fixentity(extentity &e);
75 extern void entradius(extentity &e, bool color);
76 extern bool mayattach(extentity &e);
77 extern bool attachent(extentity &e, extentity &a);
78 extern bool printent(extentity &e, char *buf, int len);
79 extern extentity *newentity();
80 extern void deleteentity(extentity *e);
81 extern void clearents();
83 extern const char *entmodel(const entity &e);
84 extern void animatemapmodel(const extentity &e, int &anim, int &basetime);
85 
86 } // ns entities
bool hasmapmodel(const extentity &e)
Definition: entities.cpp:766
Vector template.
Definition: cube_vector.hpp:22
float dropheight(entity &e)
Definition: entities.cpp:760
void editent(int i, bool local)
Definition: entities.cpp:746
void checktriggers()
Definition: entities.cpp:575
void animatemapmodel(const extentity &e, int &anim, int &basetime)
Definition: entities.cpp:649
void deleteentity(extentity *e)
Definition: entities.cpp:442
void entradius(extentity &e, bool color)
Definition: entities.cpp:683
Definition: ents.hpp:47
Definition: entities.hpp:16
void teleporteffects(fpsent *d, int tp, int td, bool local)
Definition: entities.cpp:248
void repammo(fpsent *d, int type, bool local)
Definition: entities.cpp:196
const char * entmodel(const entity &e)
Definition: entities.cpp:116
const char * entname(int i)
Definition: entities.cpp:726
vector< extentity * > ents
Definition: entities.cpp:75
const char * itemname(int i)
Definition: entities.cpp:82
Definition: ents.hpp:45
void checkitems(fpsent *d)
Definition: entities.cpp:384
persistent map entity.
Definition: ents.hpp:66
Definition: entities.hpp:17
bool attachent(extentity &e, extentity &a)
Definition: entities.cpp:80
void resettriggers()
Definition: entities.cpp:528
int extraentinfosize()
Definition: entities.cpp:39
const char * entmdlname(int type)
Definition: entities.cpp:96
Definition: ents.hpp:102
Definition: ents.hpp:46
Definition: entities.hpp:15
void readent(entity &e, char *buf, int ver)
Definition: entities.cpp:45
fpsentity()
Definition: entities.hpp:24
void putitems(packetbuf &p)
Definition: entities.cpp:408
const char * entnameinfo(entity &e)
Definition: entities.cpp:725
int triggerstate
Definition: entities.hpp:23
Definition: entities.hpp:13
void resetspawns()
Definition: entities.cpp:424
void jumppadeffects(fpsent *d, int jp, bool local)
Definition: entities.cpp:278
void spawnitems(bool force)
Definition: entities.cpp:426
bool delayspawn(int type)
Returns whether the ammo entity gets spawned at mapstart.
Definition: entities.hpp:30
int d
Definition: octaedit.cpp:1749
void renderentities()
Definition: entities.cpp:160
extentity * newentity()
Definition: entities.cpp:441
int itemicon(int i)
Definition: entities.cpp:89
void clearents()
Definition: entities.cpp:444
Definition: entities.hpp:14
vector< extentity * > & getents()
Definition: entities.cpp:77
void writeent(entity &e, char *buf)
Definition: entities.cpp:41
network packet buffer
Definition: buffer_types.hpp:132
Definition: fpsent.hpp:12
void checkquad(int time, fpsent *d)
Definition: entities.cpp:398
bool mayattach(extentity &e)
Definition: entities.cpp:79
void pickupeffects(int n, fpsent *d)
Definition: entities.cpp:204
void setspawn(int i, bool on)
Definition: entities.cpp:439
void preloadentities()
Definition: entities.cpp:126
static map entities ("entity") and dynamic entities (players/monsters, "dynent") the gamecode extends...
void teleport(int n, fpsent *d)
Definition: entities.cpp:303
static void color(const bvec &v, uchar alpha=255)
Definition: glemu.hpp:71
trigger handler
Definition: entities.hpp:21
void fixentity(extentity &e)
Definition: entities.cpp:661
int lasttrigger
Definition: entities.hpp:23
bool printent(extentity &e, char *buf, int len)
Definition: entities.cpp:720
Definition: ents.hpp:46