]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/csqcmodel/sv_model.qc
Make it compile without XONOTIC defined
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / csqcmodel / sv_model.qc
index b4d7c3eba17706e22a47f1929ef2abf45d1b54b8..dd8d5d33aaee2a8f479cd6edcc34f9047adf6730 100644 (file)
@@ -24,6 +24,7 @@
 #include "common.qh"
 #include <common/animdecide.qh>
 #include <common/constants.qh>
 #include "common.qh"
 #include <common/animdecide.qh>
 #include <common/constants.qh>
+#include <common/net_linked.qh>
 #include <common/util.qh>
 #include <server/constants.qh>
 #include <server/defs.qh>
 #include <common/util.qh>
 #include <server/constants.qh>
 #include <server/defs.qh>
 bool CSQCModel_Send(entity this, entity to, int sf)
 {
        // some nice flags for CSQCMODEL_IF
 bool CSQCModel_Send(entity this, entity to, int sf)
 {
        // some nice flags for CSQCMODEL_IF
-       float isplayer = (IS_CLIENT(this));
-       float islocalplayer = (this == to);
-       float isnolocalplayer = (isplayer && (this != to));
-
-       unused_float = isplayer;
-       unused_float = islocalplayer;
-       unused_float = isnolocalplayer;
+       noref bool isplayer = IS_CLIENT(this);
+       noref bool islocalplayer = (this == to);
+       noref bool isnolocalplayer = (isplayer && (this != to));
 
        WriteHeader(MSG_ENTITY, ENT_CLIENT_MODEL);
        WriteInt24_t(MSG_ENTITY, sf);
 
        WriteHeader(MSG_ENTITY, ENT_CLIENT_MODEL);
        WriteInt24_t(MSG_ENTITY, sf);
+       WriteByte(MSG_ENTITY, isplayer);
 
 #define CSQCMODEL_IF(cond) if(cond) {
 #define CSQCMODEL_ENDIF }
 
 #define CSQCMODEL_IF(cond) if(cond) {
 #define CSQCMODEL_ENDIF }
@@ -67,13 +65,9 @@ bool CSQCModel_Send(entity this, entity to, int sf)
 void CSQCModel_CheckUpdate(entity e)
 {
        // some nice flags for CSQCMODEL_IF
 void CSQCModel_CheckUpdate(entity e)
 {
        // some nice flags for CSQCMODEL_IF
-       float isplayer = (IS_CLIENT(e));
-       float islocalplayer = isplayer; // we set BOTH to 1 here as we need the sendflags
-       float isnolocalplayer = isplayer; // we set BOTH to 1 here as we need the sendflags
-
-       unused_float = isplayer;
-       unused_float = islocalplayer;
-       unused_float = isnolocalplayer;
+       noref float isplayer = IS_CLIENT(e);
+       noref float islocalplayer = isplayer; // we set BOTH to 1 here as we need the sendflags
+       noref float isnolocalplayer = isplayer; // we set BOTH to 1 here as we need the sendflags
 
 #if CSQCPLAYER_FORCE_UPDATES
        if(isplayer && time > e.csqcmodel_nextforcedupdate)
 
 #if CSQCPLAYER_FORCE_UPDATES
        if(isplayer && time > e.csqcmodel_nextforcedupdate)
@@ -124,13 +118,12 @@ void CSQCModel_CheckUpdate(entity e)
 
 void CSQCModel_LinkEntity(entity e)
 {
 
 void CSQCModel_LinkEntity(entity e)
 {
-       e.SendEntity3 = CSQCModel_Send;
-       e.SendEntity = SendEntity_self;
+       setSendEntity(e, CSQCModel_Send);
        e.SendFlags = 0xFFFFFF;
        CSQCModel_CheckUpdate(e);
 }
 
 void CSQCModel_UnlinkEntity(entity e)
 {
        e.SendFlags = 0xFFFFFF;
        CSQCModel_CheckUpdate(e);
 }
 
 void CSQCModel_UnlinkEntity(entity e)
 {
-       e.SendEntity3 = func_null;
+       setSendEntity(e, func_null);
 }
 }