]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Adjust smoke position of tuba and alternative instruments
authorterencehill <piuntn@gmail.com>
Tue, 1 Mar 2022 18:07:20 +0000 (19:07 +0100)
committerterencehill <piuntn@gmail.com>
Tue, 1 Mar 2022 18:07:20 +0000 (19:07 +0100)
qcsrc/common/weapons/weapon/tuba.qc

index 687ada154a5e5b18eef33d183d2127125cd2085c..43e5ca24eebb010ece7cfe76ad52dd712ed29b62 100644 (file)
@@ -306,7 +306,12 @@ void W_Tuba_NoteOn(entity actor, .entity weaponentity, float hittype)
        {
                // FIXME gettaginfo(actor.(weaponentity), 0) doesn't return the real origin of the weapon
                vector org = gettaginfo(actor.(weaponentity), 0);
-               Send_Effect(EFFECT_SMOKE_RING, org + v_up * 45 + v_right * 10 + v_forward * 14, v_up * 100, 1);
+               if(actor.(weaponentity).tuba_instrument == 1)
+                       Send_Effect(EFFECT_SMOKE_RING, org + v_up * 25 + v_right * 10 + v_forward * 14, v_up * 100, 1);
+               else if(actor.(weaponentity).tuba_instrument == 2)
+                       Send_Effect(EFFECT_SMOKE_RING, org + v_up * 50 + v_right * 10 + v_forward * 45, v_up * 100, 1);
+               else
+                       Send_Effect(EFFECT_SMOKE_RING, org + v_up * 40 + v_right * 10 + v_forward * 14, v_up * 100, 1);
                actor.(weaponentity).tuba_smoketime = time + 0.25;
        }
 }