From 17b1b568103158e96a9cb2114aa4a75933112642 Mon Sep 17 00:00:00 2001 From: terencehill Date: Sat, 26 Dec 2020 15:11:57 +0100 Subject: [PATCH] Optimize W_Tuba_NoteOn --- qcsrc/common/weapons/weapon/tuba.qc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qcsrc/common/weapons/weapon/tuba.qc b/qcsrc/common/weapons/weapon/tuba.qc index bf5fa0c98..d27351641 100644 --- a/qcsrc/common/weapons/weapon/tuba.qc +++ b/qcsrc/common/weapons/weapon/tuba.qc @@ -265,7 +265,6 @@ void W_Tuba_NoteThink(entity this) void W_Tuba_NoteOn(entity actor, .entity weaponentity, float hittype) { - vector o; float n = W_Tuba_GetNote(actor, hittype); hittype = HITTYPE_SOUND; @@ -303,9 +302,9 @@ void W_Tuba_NoteOn(entity actor, .entity weaponentity, float hittype) //sound(actor, c, TUBA_NOTE(n), bound(0, VOL_BASE * cvar("g_balance_tuba_volume"), 1), autocvar_g_balance_tuba_attenuation); RadiusDamage(actor, actor, WEP_CVAR(tuba, damage), WEP_CVAR(tuba, edgedamage), WEP_CVAR(tuba, radius), NULL, NULL, WEP_CVAR(tuba, force), hittype | WEP_TUBA.m_id, weaponentity, NULL); - o = gettaginfo(actor.exteriorweaponentity, 0); if(time > actor.(weaponentity).tuba_smoketime) { + vector o = gettaginfo(actor.exteriorweaponentity, 0); Send_Effect(EFFECT_SMOKE_RING, o + v_up * 45 + v_right * -6 + v_forward * 8, v_up * 100, 1); actor.(weaponentity).tuba_smoketime = time + 0.25; } -- 2.39.2