From: terencehill Date: Sat, 26 Dec 2020 14:11:57 +0000 (+0100) Subject: Optimize W_Tuba_NoteOn X-Git-Tag: xonotic-v0.8.5~622 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=17b1b568103158e96a9cb2114aa4a75933112642;p=xonotic%2Fxonotic-data.pk3dir.git Optimize W_Tuba_NoteOn --- 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; }