]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_tuba.qc
Merge remote branch 'refs/remotes/origin/fruitiex/racefixes'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_tuba.qc
index f3b91649159d9aef03eda4e9685cd140f036d184..491030fcbcc486cfde1249c03d5d560e09b22bb4 100644 (file)
@@ -83,13 +83,14 @@ float W_Tuba_NoteSendEntity(entity to, float sf)
                WriteCoord(MSG_ENTITY, self.origin_x);
                WriteCoord(MSG_ENTITY, self.origin_y);
                WriteCoord(MSG_ENTITY, self.origin_z);
+               WriteByte(MSG_ENTITY, self.owner != to);
        }
        return TRUE;
 }
 
 void W_Tuba_NoteThink()
 {
-       float needchange, dist_mult;
+       float dist_mult;
        float vol0, vol1;
        vector dir0, dir1;
        vector v;
@@ -102,7 +103,6 @@ void W_Tuba_NoteThink()
        }
        self.nextthink = time;
        dist_mult = cvar("g_balance_tuba_attenuation") / cvar("snd_soundradius");
-       needchange = 0;
        FOR_EACH_REALCLIENT(e)
        if(e != self.owner)
        {
@@ -241,14 +241,6 @@ float w_tuba(float req)
                return TRUE; // TODO use fuel?
        else if (req == WR_CHECKAMMO2)
                return TRUE; // TODO use fuel?
-       else if (req == WR_SUICIDEMESSAGE)
-       {
-               w_deathtypestring = "hurt his own ears with the @!#%'n Tuba";
-       }
-       else if (req == WR_KILLMESSAGE)
-       {
-               w_deathtypestring = "died of #'s great playing on the @!#%'n Tuba";
-       }
        return TRUE;
 };
 #endif
@@ -263,6 +255,14 @@ float w_tuba(float req)
        {
                // nothing to do
        }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               w_deathtypestring = "%s hurt his own ears with the @!#%%'n Tuba";
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               w_deathtypestring = "%s died of %s's great playing on the @!#%%'n Tuba";
+       }
        return TRUE;
 }
 #endif