]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix #2475 "Tuba smoke comes out of the ground"
authorterencehill <piuntn@gmail.com>
Thu, 8 Apr 2021 12:52:52 +0000 (14:52 +0200)
committerterencehill <piuntn@gmail.com>
Thu, 8 Apr 2021 12:52:52 +0000 (14:52 +0200)
qcsrc/common/weapons/weapon/tuba.qc

index d273516416b9a9599d63a20385f56ae101d8b70a..687ada154a5e5b18eef33d183d2127125cd2085c 100644 (file)
@@ -304,8 +304,9 @@ void W_Tuba_NoteOn(entity actor, .entity weaponentity, float hittype)
 
        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);
+               // 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);
                actor.(weaponentity).tuba_smoketime = time + 0.25;
        }
 }