18#include "../shared/api.h"
19#include "../shared/system/entityDef.h"
20#include "ServerGame.h"
23#include "GameRules_Editor.h"
24#include "GameRules_Home.h"
25#include "GameRules_SinglePlayer.h"
26#include "GameRules_DevShutterbug.h"
27#include "SkillManager.h"
30#include "../nav/linkflags.h"
31#include "../nav/nodes.h"
32#include "../nav/route.h"
33#include "../nav/NodeEditor.h"
34#include "../nav/way_convert.h"
35#include "../nav/NavInfo.h"
36#include "../nav/Hint.h"
38#include "SpawnManager.h"
39#include "AddonDelegate.h"
40#include "AddonManager.h"
41#include "MapDelegate.h"
43#include "VoteManager.h"
47#include "SessionManager.h"
49#include "CapturePoint.h"
50#include "CaptureItem.h"
54#define EVALUATE_FIELD(fieldname, changedflag) {\
55 if (ATTR_CHANGED(fieldname)) {\
56 SetSendFlags(changedflag);\
58 SAVE_STATE(fieldname);\
61#define EVALUATE_VECTOR(fieldname, idx, changedflag) {\
62 if (VEC_CHANGED(fieldname, idx)) {\
63 SetSendFlags(changedflag);\
65 SAVE_STATE_FIELD(fieldname, idx);\
68#define SENDENTITY_BYTE(field, changedflag) {\
69 if (flChanged & changedflag)\
70 WriteByte(MSG_ENTITY, field);\
73#define SENDENTITY_SHORT(field, changedflag) {\
74 if (flChanged & changedflag)\
75 WriteShort(MSG_ENTITY, field);\
78#define SENDENTITY_INT(field, changedflag) {\
79 if (flChanged & changedflag)\
80 WriteInt(MSG_ENTITY, field);\
83#define SENDENTITY_FLOAT(field, changedflag) {\
84 if (flChanged & changedflag)\
85 WriteFloat(MSG_ENTITY, field);\
88#define SENDENTITY_STRING(field, changedflag) {\
89 if (flChanged & changedflag)\
90 WriteString(MSG_ENTITY, field);\
93#define SENDENTITY_COORD(field, changedflag) {\
94 if (flChanged & changedflag)\
95 WriteCoord(MSG_ENTITY, field);\
98#define SENDENTITY_ANGLE(field, changedflag) {\
99 if (flChanged & changedflag)\
100 WriteAngle(MSG_ENTITY, field);\
103#define SENDENTITY_ENTITY(field, changedflag) {\
104 if (flChanged & changedflag)\
105 WriteEntity(MSG_ENTITY, field);\
108#define SENDENTITY_COLOR(field, changedflag) {\
109 if (flChanged & changedflag)\
110 WriteByte(MSG_ENTITY, field * 255.0);\
113#define SENDENTITY_MODELINDEX(field, changedflag) {\
114 if (flChanged & changedflag)\
115 WriteShort(MSG_ENTITY, field);\
118var
bool g_isloading =
false;
120var
bool autocvar_mp_flashlight =
true;
122void Client_FixAngle(entity, vector);
123void Client_ShakeOnce(vector,
float,
float,
float,
float);
130.void(
void) PlayerUse;
131.void(
void) PlayerUseUnpressed;
133.bool ruleSendInventory;
142int trace_surfaceflagsi;
144string __fullspawndata;
146var
bool g_ents_initialized =
false;
153#define SAVE_DECIMAL(x,y,z) fputs(x, sprintf("%S \"%d\" ", y, z))
154#define SAVE_INTEGER(x,y,z) fputs(x, sprintf("%S \"%i\" ", y, z))
155#define SAVE_FLOAT(x,y,z) fputs(x, sprintf("%S \"%f\" ", y, z))
156#define SAVE_VECTOR(x,y,z) fputs(x, sprintf("%S \"%v\" ", y, z))
157#define SAVE_STRING(x,y,z) fputs(x, sprintf("%S \"%s\" ", y, z))
158#define SAVE_HEX(x,y,z) fputs(x, sprintf("%S \"%x\" ", y, z))
166ncEntity EntityDef_SpawnClassname(
string className);
172ncEntity EntityDef_CreateClassname(
string className);
201WriteEntityEvent(
float to, entity targetEntity,
float eventType)
203 WriteByte(to, SVC_CGAMEPACKET);
204 WriteByte(to, EV_ENTITYEVENT);
205 WriteEntity(to, targetEntity);
206 WriteFloat(to, eventType);
210CallFunctionAsEntity(entity targetEntity,
void(
void) functionToCall)
212 if (!functionToCall) {
214 ncError(
"Invalid function call");
220 ncError(
"Invalid target entity");
224 entity oldSelf = self;
ncEntity is the lowest of the user-accessible entity class.
Definition: Entity.h:75
var materialAPI_t material
Access atlasPicAPI_t functions using this variable.
Definition: api_func.h:569
string EntityDef_GetKeyValue(string, string)
Retrieves the value of a specific key defined within an EntityDef.
Definition: entityDef.qc:275
bool EntityDef_HasSpawnClass(string className)
Checks if an entity class was defined in an EntityDef.
Definition: entityDef.qc:682
ncEntity Entity_CreateClass(string className)
Always returns a valid entity.
Definition: entityDef.qc:668
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