]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/all.qc
Fix weapon attack animations getting cut short by the animtime setting, and allow...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / all.qc
index c236bb47c4d3ef361bc5ac9705e88a78483d1933..a694112ce6672ab57a176fc720b8df8c7ace4a5e 100644 (file)
@@ -566,7 +566,10 @@ NET_HANDLE(wframe, bool isNew)
     int slot = ReadByte();
        bool restartanim = ReadByte();
        entity wepent = viewmodels[slot];
-       anim_set(wepent, a, !restartanim, restartanim, restartanim);
+       if(a.x == wepent.anim_idle_x) // we don't need to enforce idle animation
+               wepent.animstate_looping = false;
+       else
+               anim_set(wepent, a, !restartanim, restartanim, restartanim);
        wepent.state = ReadByte();
        wepent.weapon_nextthink = ReadFloat();
        switch (wepent.state)