Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Macros | Enumerations | Variables
ents.hpp File Reference

static map entities ("entity") and dynamic entities (players/monsters, "dynent") the gamecode extends these types to add game specific functionality. More...

#include "inexor/shared/geom.hpp"

Go to the source code of this file.

Classes

struct  entity
 persistent map entity. More...
 
struct  server_entity
 server side version of "entity" type More...
 
struct  entitylight
 
struct  extentity
 
struct  physent
 
struct  animinfo
 
struct  animinterpinfo
 
struct  dynent
 

Macros

#define MAXENTS   10000
 
#define ANIM_ALL   0x7F
 
#define ANIM_INDEX   0x7F
 
#define ANIM_LOOP   (1<<7)
 
#define ANIM_START   (1<<8)
 
#define ANIM_END   (1<<9)
 
#define ANIM_REVERSE   (1<<10)
 
#define ANIM_CLAMP   (ANIM_START|ANIM_END)
 
#define ANIM_DIR   0x780
 
#define ANIM_SECONDARY   11
 
#define ANIM_NOSKIN   (1<<22)
 
#define ANIM_SETTIME   (1<<23)
 
#define ANIM_FULLBRIGHT   (1<<24)
 
#define ANIM_REUSE   (1<<25)
 
#define ANIM_NORENDER   (1<<26)
 
#define ANIM_RAGDOLL   (1<<27)
 
#define ANIM_SETSPEED   (1<<28)
 
#define ANIM_NOPITCH   (1<<29)
 
#define ANIM_GHOST   (1<<30)
 
#define ANIM_FLAGS   (0x1FF<<22)
 
#define MAXANIMPARTS   3
 

Enumerations

enum  {
  ET_EMPTY = 0, ET_LIGHT, ET_MAPMODEL, ET_PLAYERSTART,
  ET_ENVMAP, ET_PARTICLES, ET_SOUND, ET_SPOTLIGHT,
  ET_GAMESPECIFIC, ET_BOMBS = 14, ET_OBSTACLE = 34
}
 ET_*: the only static entity types dictated by the engine... More...
 
enum  {
  NOTUSED = ET_EMPTY, LIGHT = ET_LIGHT, MAPMODEL = ET_MAPMODEL, PLAYERSTART,
  ENVMAP = ET_ENVMAP, PARTICLES = ET_PARTICLES, MAPSOUND = ET_SOUND, SPOTLIGHT = ET_SPOTLIGHT,
  I_SHELLS, I_BULLETS, I_ROCKETS, I_ROUNDS,
  I_GRENADES, I_CARTRIDGES, I_BOMBS = ET_BOMBS, I_BOMBRADIUS,
  I_BOMBDELAY, I_HEALTH, I_BOOST, I_GREENARMOUR,
  I_YELLOWARMOUR, I_QUAD, TELEPORT, TELEDEST,
  MONSTER, CARROT, JUMPPAD, BASE,
  RESPAWNPOINT, BOX, BARREL, PLATFORM,
  ELEVATOR, FLAG, OBSTACLE = ET_OBSTACLE, MAXENTTYPES
}
 static entity types (including game specifc ones) More...
 
enum  {
  EF_NOVIS = 1<<0, EF_NOSHADOW = 1<<1, EF_NOCOLLIDE = 1<<2, EF_ANIM = 1<<3,
  EF_OCTA = 1<<4, EF_RENDER = 1<<5, EF_SOUND = 1<<6, EF_SPAWNED = 1<<7
}
 
enum  {
  CS_ALIVE = 0, CS_DEAD, CS_SPAWNING, CS_LAGGED,
  CS_EDITING, CS_SPECTATOR
}
 
enum  {
  PHYS_FLOAT = 0, PHYS_FALL, PHYS_SLIDE, PHYS_SLOPE,
  PHYS_FLOOR, PHYS_STEP_UP, PHYS_STEP_DOWN, PHYS_BOUNCE
}
 
enum  {
  ENT_PLAYER = 0, ENT_AI, ENT_INANIMATE, ENT_CAMERA,
  ENT_BOUNCE
}
 
enum  { COLLIDE_NONE = 0, COLLIDE_ELLIPSE, COLLIDE_OBB, COLLIDE_ELLIPSE_PRECISE }
 
enum  {
  ANIM_DEAD = 0, ANIM_DYING, ANIM_IDLE, ANIM_FORWARD,
  ANIM_BACKWARD, ANIM_LEFT, ANIM_RIGHT, ANIM_HOLD1,
  ANIM_HOLD2, ANIM_HOLD3, ANIM_HOLD4, ANIM_HOLD5,
  ANIM_HOLD6, ANIM_HOLD7, ANIM_ATTACK1, ANIM_ATTACK2,
  ANIM_ATTACK3, ANIM_ATTACK4, ANIM_ATTACK5, ANIM_ATTACK6,
  ANIM_ATTACK7, ANIM_PAIN, ANIM_JUMP, ANIM_SINK,
  ANIM_SWIM, ANIM_EDIT, ANIM_LAG, ANIM_TAUNT,
  ANIM_WIN, ANIM_LOSE, ANIM_GUN_IDLE, ANIM_GUN_SHOOT,
  ANIM_VWEP_IDLE, ANIM_VWEP_SHOOT, ANIM_SHIELD, ANIM_POWERUP,
  ANIM_MAPMODEL, ANIM_TRIGGER, NUMANIMS
}
 

Variables

static const char *const animnames []
 

Detailed Description

static map entities ("entity") and dynamic entities (players/monsters, "dynent") the gamecode extends these types to add game specific functionality.


Class Documentation

struct server_entity

server side version of "entity" type

Class Members
bool spawned
int spawntime
int type

Macro Definition Documentation

#define ANIM_ALL   0x7F
#define ANIM_CLAMP   (ANIM_START|ANIM_END)
#define ANIM_DIR   0x780
#define ANIM_END   (1<<9)
#define ANIM_FLAGS   (0x1FF<<22)
#define ANIM_FULLBRIGHT   (1<<24)
#define ANIM_GHOST   (1<<30)
#define ANIM_INDEX   0x7F
#define ANIM_LOOP   (1<<7)
#define ANIM_NOPITCH   (1<<29)
#define ANIM_NORENDER   (1<<26)
#define ANIM_NOSKIN   (1<<22)
#define ANIM_RAGDOLL   (1<<27)
#define ANIM_REUSE   (1<<25)
#define ANIM_REVERSE   (1<<10)
#define ANIM_SECONDARY   11
#define ANIM_SETSPEED   (1<<28)
#define ANIM_SETTIME   (1<<23)
#define ANIM_START   (1<<8)
#define MAXANIMPARTS   3
#define MAXENTS   10000

Enumeration Type Documentation

anonymous enum

ET_*: the only static entity types dictated by the engine...

rest are gamecode dependent. We differ them because the serialisation system provides backwards compatibility! We try not to change these values if possible.

Enumerator
ET_EMPTY 
ET_LIGHT 
ET_MAPMODEL 
ET_PLAYERSTART 
ET_ENVMAP 
ET_PARTICLES 
ET_SOUND 
ET_SPOTLIGHT 
ET_GAMESPECIFIC 
ET_BOMBS 
ET_OBSTACLE 
anonymous enum

static entity types (including game specifc ones)

Warning
this system may becomes deprecated because of the new entity system! Otherwise merge both enums.
Enumerator
NOTUSED 
LIGHT 

entity slot not in used in maps

MAPMODEL 

lightsource, attr1 = radius, attr2 = intensity

PLAYERSTART 

attr1 = z-angle, attr2 = idx

ENVMAP 

attr1 = z-angle, attr2 = team

PARTICLES 

attr1 = radius

MAPSOUND 

particles (may becomes deprecated because of the new particle system)

SPOTLIGHT 

sounds

I_SHELLS 

cone-shaped spotlights

I_BULLETS 
I_ROCKETS 
I_ROUNDS 
I_GRENADES 
I_CARTRIDGES 
I_BOMBS 

ammo pickups

I_BOMBRADIUS 

bomberman game mode

I_BOMBDELAY 

bomb radius (see bomberman game mode)

I_HEALTH 

bomberman game mode

I_BOOST 
I_GREENARMOUR 
I_YELLOWARMOUR 
I_QUAD 
TELEPORT 
TELEDEST 

attr1 = idx, attr2 = model, attr3 = tag

MONSTER 

attr1 = z-angle, attr2 = idx

CARROT 

attr1 = z-angle, attr2 = monstertype

JUMPPAD 

attr1 = tag, attr2 = type

BASE 

attr1 = z-push, attr2 = y-push, attr3 = x-push

RESPAWNPOINT 

base (regencapture and capture game modes)

BOX 

singleplayer: respawn points ('respawnpoint set' :))

BARREL 

attr1 = z-angle, attr2 = idx, attr3 = weight

PLATFORM 

attr1 = z-angle, attr2 = idx, attr3 = weight, attr4 = health

ELEVATOR 

attr1 = z-angle, attr2 = idx, attr3 = tag, attr4 = speed

FLAG 

attr1 = z-angle, attr2 = idx, attr3 = tag, attr4 = speed

OBSTACLE 

attr1 = z-angle, attr2 = team

MAXENTTYPES 

attr1 = z-angle, attr2 = idx (mapmodel index), attr3 = health, attr4 = weight, attr5 = respawnmillis

anonymous enum
Enumerator
EF_NOVIS 
EF_NOSHADOW 
EF_NOCOLLIDE 
EF_ANIM 
EF_OCTA 
EF_RENDER 
EF_SOUND 
EF_SPAWNED 
anonymous enum
Enumerator
CS_ALIVE 
CS_DEAD 
CS_SPAWNING 
CS_LAGGED 
CS_EDITING 
CS_SPECTATOR 
anonymous enum
Enumerator
PHYS_FLOAT 
PHYS_FALL 
PHYS_SLIDE 
PHYS_SLOPE 
PHYS_FLOOR 
PHYS_STEP_UP 
PHYS_STEP_DOWN 
PHYS_BOUNCE 
anonymous enum
Enumerator
ENT_PLAYER 
ENT_AI 
ENT_INANIMATE 
ENT_CAMERA 
ENT_BOUNCE 
anonymous enum
Enumerator
COLLIDE_NONE 
COLLIDE_ELLIPSE 
COLLIDE_OBB 
COLLIDE_ELLIPSE_PRECISE 
anonymous enum
Enumerator
ANIM_DEAD 
ANIM_DYING 
ANIM_IDLE 
ANIM_FORWARD 
ANIM_BACKWARD 
ANIM_LEFT 
ANIM_RIGHT 
ANIM_HOLD1 
ANIM_HOLD2 
ANIM_HOLD3 
ANIM_HOLD4 
ANIM_HOLD5 
ANIM_HOLD6 
ANIM_HOLD7 
ANIM_ATTACK1 
ANIM_ATTACK2 
ANIM_ATTACK3 
ANIM_ATTACK4 
ANIM_ATTACK5 
ANIM_ATTACK6 
ANIM_ATTACK7 
ANIM_PAIN 
ANIM_JUMP 
ANIM_SINK 
ANIM_SWIM 
ANIM_EDIT 
ANIM_LAG 
ANIM_TAUNT 
ANIM_WIN 
ANIM_LOSE 
ANIM_GUN_IDLE 
ANIM_GUN_SHOOT 
ANIM_VWEP_IDLE 
ANIM_VWEP_SHOOT 
ANIM_SHIELD 
ANIM_POWERUP 
ANIM_MAPMODEL 
ANIM_TRIGGER 
NUMANIMS 

Variable Documentation

const char* const animnames[]
static
Initial value:
=
{
"dead", "dying", "idle",
"forward", "backward", "left", "right",
"hold 1", "hold 2", "hold 3", "hold 4", "hold 5", "hold 6", "hold 7",
"attack 1", "attack 2", "attack 3", "attack 4", "attack 5", "attack 6", "attack 7",
"pain",
"jump", "sink", "swim",
"edit", "lag", "taunt", "win", "lose",
"gun idle", "gun shoot",
"vwep idle", "vwep shoot", "shield", "powerup",
"mapmodel", "trigger"
}

Referenced by findanims().