X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fweapon%2Ftuba.qc;h=5d9abce339ef5b5b909831f3de44defb55c974ab;hb=91819987a61f7675e34866edcb0fe3671a9b1ba4;hp=37c36964a2299655452f9cffb2e9397181aaaabe;hpb=5c9f51cd3a9f0b63733ee7b81649e81872a86765;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/weapons/weapon/tuba.qc b/qcsrc/common/weapons/weapon/tuba.qc index 37c36964a..5d9abce33 100644 --- a/qcsrc/common/weapons/weapon/tuba.qc +++ b/qcsrc/common/weapons/weapon/tuba.qc @@ -268,11 +268,7 @@ void W_Tuba_NoteThink(entity this) void W_Tuba_NoteOn(entity actor, .entity weaponentity, float hittype) { vector o; - float n; - - W_SetupShot(actor, weaponentity, false, 2, SND_Null, 0, WEP_CVAR(tuba, damage)); - - n = W_Tuba_GetNote(actor, hittype); + float n = W_Tuba_GetNote(actor, hittype); hittype = 0; if(actor.(weaponentity).tuba_instrument & 1) @@ -280,6 +276,8 @@ void W_Tuba_NoteOn(entity actor, .entity weaponentity, float hittype) if(actor.(weaponentity).tuba_instrument & 2) hittype |= HITTYPE_BOUNCE; + W_SetupShot(actor, weaponentity, false, 2, SND_Null, 0, WEP_CVAR(tuba, damage), hittype | WEP_TUBA.m_id); + if(actor.(weaponentity).tuba_note) { if(actor.(weaponentity).tuba_note.cnt != n || actor.(weaponentity).tuba_note.tuba_instrument != actor.(weaponentity).tuba_instrument) @@ -305,7 +303,7 @@ void W_Tuba_NoteOn(entity actor, .entity weaponentity, float hittype) actor.(weaponentity).tuba_note.teleport_time = time + WEP_CVAR(tuba, refire) * 2 * W_WeaponRateFactor(actor); // so it can get prolonged safely //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, NULL); + 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) @@ -378,7 +376,12 @@ METHOD(Tuba, wr_reload, void(Tuba this, entity actor, .entity weaponentity)) actor.(weaponentity).weaponname = "tuba"; break; } - W_SetupShot(actor, weaponentity, false, 0, SND_Null, 0, 0); + int hittype = 0; + if(actor.(weaponentity).tuba_instrument & 1) + hittype |= HITTYPE_SECONDARY; + if(actor.(weaponentity).tuba_instrument & 2) + hittype |= HITTYPE_BOUNCE; + W_SetupShot(actor, weaponentity, false, 0, SND_Null, 0, 0, hittype | WEP_TUBA.m_id); 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);