From: Mario Date: Sun, 3 Jan 2016 15:29:38 +0000 (+1000) Subject: Fix the only remaining cases of self in CSQC model lib X-Git-Tag: xonotic-v0.8.2~1301 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=bdecb94df7bdf9fe178718206d94b878527a66f6;p=xonotic%2Fxonotic-data.pk3dir.git Fix the only remaining cases of self in CSQC model lib --- diff --git a/qcsrc/common/mutators/mutator/physical_items/physical_items.qc b/qcsrc/common/mutators/mutator/physical_items/physical_items.qc index b473e8fc9..e8e152a5b 100644 --- a/qcsrc/common/mutators/mutator/physical_items/physical_items.qc +++ b/qcsrc/common/mutators/mutator/physical_items/physical_items.qc @@ -136,7 +136,7 @@ MUTATOR_HOOKFUNCTION(physical_items, Item_Spawn) self.effects |= EF_NODRAW; // hide the original weapon self.movetype = MOVETYPE_FOLLOW; self.aiment = wep; // attach the original weapon - self.SendEntity = func_null; + self.SendEntity3 = func_null; return false; } diff --git a/qcsrc/lib/csqcmodel/sv_model.qc b/qcsrc/lib/csqcmodel/sv_model.qc index 7f08faf43..b4d7c3eba 100644 --- a/qcsrc/lib/csqcmodel/sv_model.qc +++ b/qcsrc/lib/csqcmodel/sv_model.qc @@ -30,12 +30,12 @@ // generic CSQC model code -bool CSQCModel_Send(entity to, int sf) -{SELFPARAM(); +bool CSQCModel_Send(entity this, entity to, int sf) +{ // some nice flags for CSQCMODEL_IF - float isplayer = (IS_CLIENT(self)); - float islocalplayer = (self == to); - float isnolocalplayer = (isplayer && (self != to)); + float isplayer = (IS_CLIENT(this)); + float islocalplayer = (this == to); + float isnolocalplayer = (isplayer && (this != to)); unused_float = isplayer; unused_float = islocalplayer; @@ -49,7 +49,7 @@ bool CSQCModel_Send(entity to, int sf) #define CSQCMODEL_PROPERTY(flag,t,r,w,f) \ if(sf & flag) \ { \ - w(MSG_ENTITY, self.csqcmodel_##f); \ + w(MSG_ENTITY, this.csqcmodel_##f); \ } #define CSQCMODEL_PROPERTY_SCALED(flag,t,r,w,f,s,mi,ma) CSQCMODEL_PROPERTY(flag,t,r,w,f) ALLPROPERTIES @@ -124,12 +124,13 @@ void CSQCModel_CheckUpdate(entity e) void CSQCModel_LinkEntity(entity e) { - e.SendEntity = CSQCModel_Send; + e.SendEntity3 = CSQCModel_Send; + e.SendEntity = SendEntity_self; e.SendFlags = 0xFFFFFF; CSQCModel_CheckUpdate(e); } void CSQCModel_UnlinkEntity(entity e) { - e.SendEntity = func_null; + e.SendEntity3 = func_null; }