From: Freddy Date: Tue, 16 Aug 2016 20:40:14 +0000 (+0200) Subject: Don't set the weaponmodel every frame (Fixes Issue #1790) X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=25aef837e567e1c6b74551d27ab416466c62290c;p=xonotic%2Fxonotic-data.pk3dir.git Don't set the weaponmodel every frame (Fixes Issue #1790) Also disable the reload animation for switching to tuba alternatives, it will only play after the form is already switched and is way to long anyways --- diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index 339d05209..7f1ef2ce9 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -312,7 +312,7 @@ void viewmodel_draw(entity this) static string name_last; string name = wep.mdl; bool swap = name != name_last; - // if (swap) + if (swap) { name_last = name; CL_WeaponEntity_SetModel(this, name, swap); diff --git a/qcsrc/common/weapons/weapon/tuba.qc b/qcsrc/common/weapons/weapon/tuba.qc index 31d2bf7a6..b9c1554b9 100644 --- a/qcsrc/common/weapons/weapon/tuba.qc +++ b/qcsrc/common/weapons/weapon/tuba.qc @@ -451,7 +451,10 @@ METHOD(Tuba, wr_reload, void(Tuba this, entity actor, .entity weaponentity)) W_SetupShot(actor, weaponentity, false, 0, SND_Null, 0, 0); Send_Effect(EFFECT_TELEPORT, w_shotorg, '0 0 0', 1); actor.(weaponentity).state = WS_INUSE; - weapon_thinkf(actor, weaponentity, WFRAME_RELOAD, 0.5, w_ready); + // TODO: don't show the reload animation cause the weapon is already switched + // switch animations need a better system +// weapon_thinkf(actor, weaponentity, WFRAME_RELOAD, 0.5, w_ready); + weapon_thinkf(actor, weaponentity, WFRAME_IDLE, 0.5, w_ready); } } #endif