]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
wframe_send: stop sending switchdelay
authorTimePath <andrew.hardaker1995@gmail.com>
Thu, 10 Dec 2015 02:19:11 +0000 (13:19 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Thu, 10 Dec 2015 02:19:11 +0000 (13:19 +1100)
qcsrc/common/weapons/all.qc

index fc3bd9167a27121b7376da6c33cb684be0dbac14..b18d6991a8a80c1c7980f6331d7bbd52801aff3d 100644 (file)
@@ -562,8 +562,10 @@ NET_HANDLE(wframe, bool isNew)
        switch (viewmodel.state)
        {
                case WS_RAISE:
+                       viewmodel.weapon_switchdelay = activeweapon.switchdelay_raise;
+                       break;
                case WS_DROP:
-                       viewmodel.weapon_switchdelay = ReadFloat();
+                       viewmodel.weapon_switchdelay = activeweapon.switchdelay_drop;
                        break;
         default:
             viewmodel.weapon_switchdelay = 0;
@@ -587,16 +589,6 @@ void wframe_send(entity actor, entity weaponentity, vector a, bool restartanim)
        WriteByte(channel, weaponentity.state);
        WriteFloat(channel, weaponentity.weapon_nextthink);
        WriteByte(channel, weaponentity.m_alpha * 255);
-       Weapon w = Weapons_from(actor.weapon);
-       switch (weaponentity.state)
-       {
-               case WS_RAISE:
-                       WriteFloat(channel, w.switchdelay_raise);
-                       break;
-               case WS_DROP:
-                       WriteFloat(channel, w.switchdelay_drop);
-                       break;
-       }
 }
 #endif