]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make CSQC items much more accurately predicted
authorMario <mario@smbclan.net>
Wed, 16 Dec 2015 05:58:47 +0000 (15:58 +1000)
committerMario <mario@smbclan.net>
Wed, 16 Dec 2015 05:58:47 +0000 (15:58 +1000)
qcsrc/server/t_items.qc

index 35fd8783205a9d2f017b263bcae1a04bf0d50302..d258495332f372f4af29bae6ef65ed3a7e3cc069 100644 (file)
@@ -174,6 +174,9 @@ NET_HANDLE(ENT_CLIENT_ITEM, bool isnew)
         self.drawmask  = MASK_NORMAL;
                self.move_movetype = self.movetype = MOVETYPE_TOSS;
         self.draw       = ItemDraw;
+        //self.move_flags |= FL_ITEM;
+
+        bool use_bigsize = ReadByte();
 
         self.fade_end = ReadShort();
         self.fade_start = ReadShort();
@@ -215,6 +218,8 @@ NET_HANDLE(ENT_CLIENT_ITEM, bool isnew)
 
         precache_model(self.mdl);
         _setmodel(self, self.mdl);
+
+        setsize(self, '-16 -16 0', (use_bigsize) ? '16 16 48' : '16 16 32');
     }
 
     if(sf & ISF_COLORMAP)
@@ -293,6 +298,8 @@ bool ItemSend(entity this, entity to, int sf)
 
        if(sf & ISF_MODEL)
        {
+               Pickup p = this.itemdef;
+               WriteByte(MSG_ENTITY, p.instanceOfPowerup || p.instanceOfHealth || p.instanceOfArmor);
                WriteShort(MSG_ENTITY, self.fade_end);
                WriteShort(MSG_ENTITY, self.fade_start);