17#include "../shared/entityDef.h"
22#include "../nav/defs.h"
31#define EVALUATE_FIELD(fieldname, changedflag) {\
32 if (ATTR_CHANGED(fieldname)) {\
33 SetSendFlags(changedflag);\
35 SAVE_STATE(fieldname);\
38#define EVALUATE_VECTOR(fieldname, idx, changedflag) {\
39 if (VEC_CHANGED(fieldname, idx)) {\
40 SetSendFlags(changedflag);\
42 SAVE_STATE_FIELD(fieldname, idx);\
45#define SENDENTITY_BYTE(field, changedflag) {\
46 if (flChanged & changedflag)\
47 WriteByte(MSG_ENTITY, field);\
50#define SENDENTITY_SHORT(field, changedflag) {\
51 if (flChanged & changedflag)\
52 WriteShort(MSG_ENTITY, field);\
55#define SENDENTITY_INT(field, changedflag) {\
56 if (flChanged & changedflag)\
57 WriteInt(MSG_ENTITY, field);\
60#define SENDENTITY_FLOAT(field, changedflag) {\
61 if (flChanged & changedflag)\
62 WriteFloat(MSG_ENTITY, field);\
65#define SENDENTITY_STRING(field, changedflag) {\
66 if (flChanged & changedflag)\
67 WriteString(MSG_ENTITY, field);\
70#define SENDENTITY_COORD(field, changedflag) {\
71 if (flChanged & changedflag)\
72 WriteCoord(MSG_ENTITY, field);\
75#define SENDENTITY_ANGLE(field, changedflag) {\
76 if (flChanged & changedflag)\
77 WriteAngle(MSG_ENTITY, field);\
80#define SENDENTITY_ENTITY(field, changedflag) {\
81 if (flChanged & changedflag)\
82 WriteEntity(MSG_ENTITY, field);\
85#define SENDENTITY_COLOR(field, changedflag) {\
86 if (flChanged & changedflag)\
87 WriteByte(MSG_ENTITY, field * 255.0);\
90#define SENDENTITY_MODELINDEX(field, changedflag) {\
91 if (flChanged & changedflag)\
92 WriteShort(MSG_ENTITY, field);\
107.void(
void) PlayerUse;
108.void(
void) PlayerUseUnpressed;
139#define SAVE_DECIMAL(x,y,z) fputs(x, sprintf("%S \"%d\" ", y, z))
140#define SAVE_INTEGER(x,y,z) fputs(x, sprintf("%S \"%i\" ", y, z))
141#define SAVE_FLOAT(x,y,z) fputs(x, sprintf("%S \"%f\" ", y, z))
142#define SAVE_VECTOR(x,y,z) fputs(x, sprintf("%S \"%v\" ", y, z))
143#define SAVE_STRING(x,y,z) fputs(x, sprintf("%S \"%s\" ", y, z))
144#define SAVE_HEX(x,y,z) fputs(x, sprintf("%S \"%x\" ", y, z))
189 WriteByte(to, SVC_CGAMEPACKET);
191 WriteEntity(to, targetEntity);
192 WriteFloat(to, eventType);
Gamerule top level class.
NSEntity is the lowest of the user-accessible entity class.
Definition: NSEntity.h:54
@ EV_ENTITYEVENT
Definition: events.h:23
bodyType_t
Hitmesh types that models can support.
Definition: hitmesh.h:21
Server-Plugin APIs, similar to MetaMod.
NSEntity g_dmg_eTarget
Definition: defs.h:125
NSEntity EntityDef_SpawnClassname(string className)
When called will turn the entity 'self' into the specified classname.
Definition: entityDef.qc:513
string startspot
Definition: defs.h:120
string __fullspawndata
Definition: defs.h:121
int g_dmg_iWeapon
Definition: defs.h:129
string EntityDef_GetKeyValue(string className, string keyName)
Retrieves the value of a specific key defined within an EntityDef.
Definition: entityDef.qc:282
var bool g_ents_initialized
Definition: defs.h:132
void WriteEntityEvent(float to, entity targetEntity, float eventType)
Definition: defs.h:187
bool iBleeds
Definition: defs.h:109
var bool g_isloading
Definition: defs.h:95
void main(void)
Definition: defs.h:135
entity real_owner
Definition: defs.h:117
entity eUser
Definition: defs.h:110
void Client_ShakeOnce(vector, float, float, float, float)
Definition: NSClient.qc:215
void Client_FixAngle(entity, vector)
Definition: NSClient.qc:195
NSEntity eActivator
Definition: defs.h:104
int trace_surfaceflagsi
Definition: defs.h:119
bool EntityDef_HasSpawnClass(string className)
Checks if an entity class was defined in an EntityDef.
Definition: entityDef.qc:576
vector g_dmg_vecLocation
Definition: defs.h:130
NSEntity EntityDef_CreateClassname(string className)
Spawns an entity of a specific class.
Definition: entityDef.qc:532
float botinfo
Definition: defs.h:113
var bool autocvar_mp_flashlight
Definition: defs.h:97
NSEntity g_dmg_eAttacker
Definition: defs.h:124
float deaths
Definition: defs.h:112
void Mapcycle_Load(string)
Definition: mapcycle.qc:18
float material
Definition: defs.h:111
int g_dmg_iFlags
Definition: defs.h:128
bodyType_t g_dmg_iHitBody
Definition: defs.h:127
NSEntity Entity_CreateClass(string className)
Spawns an entity of a class, guaranteed to be valid.
Definition: entityDef.qc:562
int g_dmg_iDamage
Definition: defs.h:126