18#include "../shared/api.h"
19#include "../shared/entityDef.h"
21#include "NSGameRules.h"
24#include "../nav/defs.h"
34#define EVALUATE_FIELD(fieldname, changedflag) {\
35 if (ATTR_CHANGED(fieldname)) {\
36 SetSendFlags(changedflag);\
38 SAVE_STATE(fieldname);\
41#define EVALUATE_VECTOR(fieldname, idx, changedflag) {\
42 if (VEC_CHANGED(fieldname, idx)) {\
43 SetSendFlags(changedflag);\
45 SAVE_STATE_FIELD(fieldname, idx);\
48#define SENDENTITY_BYTE(field, changedflag) {\
49 if (flChanged & changedflag)\
50 WriteByte(MSG_ENTITY, field);\
53#define SENDENTITY_SHORT(field, changedflag) {\
54 if (flChanged & changedflag)\
55 WriteShort(MSG_ENTITY, field);\
58#define SENDENTITY_INT(field, changedflag) {\
59 if (flChanged & changedflag)\
60 WriteInt(MSG_ENTITY, field);\
63#define SENDENTITY_FLOAT(field, changedflag) {\
64 if (flChanged & changedflag)\
65 WriteFloat(MSG_ENTITY, field);\
68#define SENDENTITY_STRING(field, changedflag) {\
69 if (flChanged & changedflag)\
70 WriteString(MSG_ENTITY, field);\
73#define SENDENTITY_COORD(field, changedflag) {\
74 if (flChanged & changedflag)\
75 WriteCoord(MSG_ENTITY, field);\
78#define SENDENTITY_ANGLE(field, changedflag) {\
79 if (flChanged & changedflag)\
80 WriteAngle(MSG_ENTITY, field);\
83#define SENDENTITY_ENTITY(field, changedflag) {\
84 if (flChanged & changedflag)\
85 WriteEntity(MSG_ENTITY, field);\
88#define SENDENTITY_COLOR(field, changedflag) {\
89 if (flChanged & changedflag)\
90 WriteByte(MSG_ENTITY, field * 255.0);\
93#define SENDENTITY_MODELINDEX(field, changedflag) {\
94 if (flChanged & changedflag)\
95 WriteShort(MSG_ENTITY, field);\
98var
bool g_isloading =
false;
100var
bool autocvar_mp_flashlight =
true;
102void Client_FixAngle(entity, vector);
103void Client_ShakeOnce(vector,
float,
float,
float,
float);
110.void(
void) PlayerUse;
111.void(
void) PlayerUseUnpressed;
122int trace_surfaceflagsi;
124string __fullspawndata;
126var
bool g_ents_initialized = FALSE;
133#define SAVE_DECIMAL(x,y,z) fputs(x, sprintf("%S \"%d\" ", y, z))
134#define SAVE_INTEGER(x,y,z) fputs(x, sprintf("%S \"%i\" ", y, z))
135#define SAVE_FLOAT(x,y,z) fputs(x, sprintf("%S \"%f\" ", y, z))
136#define SAVE_VECTOR(x,y,z) fputs(x, sprintf("%S \"%v\" ", y, z))
137#define SAVE_STRING(x,y,z) fputs(x, sprintf("%S \"%s\" ", y, z))
138#define SAVE_HEX(x,y,z) fputs(x, sprintf("%S \"%x\" ", y, z))
146NSEntity EntityDef_SpawnClassname(
string className);
152NSEntity EntityDef_CreateClassname(
string className);
181WriteEntityEvent(
float to, entity targetEntity,
float eventType)
183 WriteByte(to, SVC_CGAMEPACKET);
184 WriteByte(to, EV_ENTITYEVENT);
185 WriteEntity(to, targetEntity);
186 WriteFloat(to, eventType);
NSEntity is the lowest of the user-accessible entity class.
Definition: NSEntity.h:54
float botinfo
Definition: botinfo.h:41
string EntityDef_GetKeyValue(string, string)
Retrieves the value of a specific key defined within an EntityDef.
Definition: entityDef.qc:283
bool EntityDef_HasSpawnClass(string className)
Checks if an entity class was defined in an EntityDef.
Definition: entityDef.qc:618
NSEntity Entity_CreateClass(string className)
Always returns a valid entity.
Definition: entityDef.qc:604
void Mapcycle_Load(string)
Can be called by the server game to override the current mapcycle with that of a custom mapcycle file...
Definition: mapcycle.qc:18