}
if(this.lodmodelindex1)
- if (!this.net_sendentity)
+ if (!getSendEntity(this))
SetCustomizer(this, LOD_customize, LOD_uncustomize);
}
IntrusiveList g_uncustomizables;
STATIC_INIT(g_uncustomizables) { g_uncustomizables = IL_NEW(); }
- .bool(entity this, entity to, int sendflags) net_sendentity;
-
- bool Net_SendEntity(entity to, int sendflags)
- {
- ENGINE_EVENT();
- return (this.net_sendentity) ? this.net_sendentity(this, to, sendflags) : false;
- }
-
void Net_LinkEntity(entity e, bool docull, bool checkmodel, float dt, bool(entity this, entity to, int sendflags) sendfunc)
{
if (e.classname == "")
setsize(e, mi, ma);
}
- e.net_sendentity = sendfunc;
- e.SendEntity = Net_SendEntity;
+ setSendEntity(e, sendfunc);
e.SendFlags = 0xFFFFFF;
if (!docull) e.effects |= EF_NODEPTHTEST;
void Net_UnlinkEntity(entity e)
{
- e.net_sendentity = func_null;
- e.SendEntity = func_null;
+ setSendEntity(e, func_null);
}
.void(entity this) uncustomizeentityforclient;
SELFWRAP(camera_transform, vector, (vector org, vector ang), (entity this, vector org, vector ang), (this, org, ang))
#define setcamera_transform(e, f) SELFWRAP_SET(camera_transform, e, f)
-// NOTE: still references self via ENGINE_EVENT
-#if 0
/** return false to remove from the client */
SELFWRAP(SendEntity, bool, (entity to, int sendflags), (entity this, entity to, int sendflags), (this, to, sendflags))
#define setSendEntity(e, f) SELFWRAP_SET(SendEntity, e, f)
#define getSendEntity(e) SELFWRAP_GET(SendEntity, e)
-#endif
#define ChangeYaw(e, ...) (__self = (e), builtin_ChangeYaw(__VA_ARGS__))
#define checkclient(e, ...) (__self = (e), builtin_checkclient(__VA_ARGS__))
void UpdateItemAfterTeleport(entity this)
{
- if(this.net_sendentity == ItemSend)
+ if(getSendEntity(this) == ItemSend)
ItemUpdate(this);
}
void UpdateCSQCProjectile(entity e)
{
- if(e.net_sendentity == CSQCProjectile_SendEntity)
+ if(getSendEntity(e) == CSQCProjectile_SendEntity)
{
// send new origin data
e.SendFlags |= 0x01;
}
// FIXME HACK
- else if(e.net_sendentity == ItemSend)
+ else if(getSendEntity(e) == ItemSend)
{
ItemUpdate(e);
}
void UpdateCSQCProjectileAfterTeleport(entity e)
{
- if(e.net_sendentity == CSQCProjectile_SendEntity)
+ if(getSendEntity(e) == CSQCProjectile_SendEntity)
{
// send new origin data
e.SendFlags |= 0x01;