Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Namespaces | Macros | Enumerations | Functions | Variables
entities.cpp File Reference
#include <math.h>
#include <stddef.h>
#include <memory>
#include <enet/enet.h>
#include "inexor/client/network.hpp"
#include "inexor/engine/particles.hpp"
#include "inexor/engine/renderparticles.hpp"
#include "inexor/engine/world.hpp"
#include "inexor/fpsgame/ai.hpp"
#include "inexor/fpsgame/client.hpp"
#include "inexor/fpsgame/entities.hpp"
#include "inexor/fpsgame/fps.hpp"
#include "inexor/fpsgame/fpsent.hpp"
#include "inexor/fpsgame/guns.hpp"
#include "inexor/fpsgame/player.hpp"
#include "inexor/gamemode/gamemode.hpp"
#include "inexor/io/Logging.hpp"
#include "inexor/model/model.hpp"
#include "inexor/network/SharedVar.hpp"
#include "inexor/network/legacy/buffer_types.hpp"
#include "inexor/network/legacy/cube_network.hpp"
#include "inexor/network/legacy/game_types.hpp"
#include "inexor/physics/physics.hpp"
#include "inexor/shared/command.hpp"
#include "inexor/shared/cube_formatting.hpp"
#include "inexor/shared/cube_loops.hpp"
#include "inexor/shared/geom.hpp"
#include "inexor/sound/sound.hpp"
#include "inexor/util/legacy_time.hpp"

Namespaces

 entities
 

Macros

#define validtrigger(type)   (triggertypes[(type) & (NUMTRIGGERTYPES-1)]>=0)
 
#define checktriggertype(type, flag)   (triggertypes[(type) & (NUMTRIGGERTYPES-1)] & (flag))
 

Enumerations

enum  {
  entities::TRIG_COLLIDE = 1<<0, entities::TRIG_TOGGLE = 1<<1, entities::TRIG_ONCE = 0<<2, entities::TRIG_MANY = 1<<2,
  entities::TRIG_DISAPPEAR = 1<<3, entities::TRIG_AUTO_RESET = 1<<4, entities::TRIG_RUMBLE = 1<<5, entities::TRIG_LOCKED = 1<<6,
  entities::TRIG_ENDSP = 1<<7
}
 

Functions

int entities::extraentinfosize ()
 
void entities::writeent (entity &e, char *buf)
 
void entities::readent (entity &e, char *buf, int ver)
 
vector< extentity * > & entities::getents ()
 
bool entities::mayattach (extentity &e)
 
bool entities::attachent (extentity &e, extentity &a)
 
const char * entities::itemname (int i)
 
int entities::itemicon (int i)
 
const char * entities::entmdlname (int type)
 
const char * entities::entmodel (const entity &e)
 
void entities::preloadentities ()
 
void entities::renderentities ()
 
void entities::addammo (int type, int &v, bool local)
 
void entities::repammo (fpsent *d, int type, bool local)
 
void entities::pickupeffects (int n, fpsent *d)
 
void entities::teleporteffects (fpsent *d, int tp, int td, bool local)
 
void entities::jumppadeffects (fpsent *d, int jp, bool local)
 
void entities::teleport (int n, fpsent *d)
 
void entities::trypickup (int n, fpsent *d)
 
void entities::checkitems (fpsent *d)
 
void entities::checkquad (int time, fpsent *d)
 
void entities::putitems (packetbuf &p)
 
void entities::resetspawns ()
 
void entities::spawnitems (bool force)
 
void entities::setspawn (int i, bool on)
 
extentityentities::newentity ()
 
void entities::deleteentity (extentity *e)
 
void entities::clearents ()
 
static void entities::cleartriggerflags (extentity &e)
 
static void entities::setuptriggerflags (fpsentity &e)
 
void entities::resettriggers ()
 
void entities::unlocktriggers (int tag, int oldstate=TRIGGER_RESET, int newstate=TRIGGERING)
 
 entities::ICOMMAND (trigger,"ii",(int *tag, int *state),{if(*state) unlocktriggers(*tag);else unlocktriggers(*tag, TRIGGERED, TRIGGER_RESETTING);})
 
 entities::VAR (triggerstate,-1, 0, 1)
 
void entities::doleveltrigger (int trigger, int state)
 
void entities::checktriggers ()
 
void entities::animatemapmodel (const extentity &e, int &anim, int &basetime)
 
void entities::fixentity (extentity &e)
 
void entities::entradius (extentity &e, bool color)
 
bool entities::printent (extentity &e, char *buf, int len)
 
const char * entities::entnameinfo (entity &e)
 
const char * entities::entname (int i)
 
void entities::editent (int i, bool local)
 
float entities::dropheight (entity &e)
 
bool entities::hasmapmodel (const extentity &e)
 

Variables

vector< extentity * > entities::ents
 
static const int entities::NUMTRIGGERTYPES = 32
 
static const int entities::triggertypes [NUMTRIGGERTYPES]
 

Macro Definition Documentation

#define checktriggertype (   type,
  flag 
)    (triggertypes[(type) & (NUMTRIGGERTYPES-1)] & (flag))
#define validtrigger (   type)    (triggertypes[(type) & (NUMTRIGGERTYPES-1)]>=0)