]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_tuba.qc
Clean some things
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_tuba.qc
index 355975bec9371c1388f061f5a893e33b7c756167..43397be001093c5253dfce01b679d3dd464c91ee 100644 (file)
@@ -125,10 +125,13 @@ void W_Tuba_NoteOff()
                        {
                                default:
                                case 0: // Tuba
-                                       bprint(strcat("\{1}\{13}* ^3", self.owner.netname, "^3 played on the @!#%%'n Tuba: ^7", s, "\n"));
+                                       bprint(strcat("\{1}\{13}* ^3", self.owner.netname, "^3 played on the @!#%'n Tuba: ^7", s, "\n"));
                                        break;
                                case 1:
-                                       bprint(strcat("\{1}\{13}* ^3", self.owner.netname, "^3 played on the @!#%%'n Accordeon: ^7", s, "\n"));
+                                       bprint(strcat("\{1}\{13}* ^3", self.owner.netname, "^3 played on the @!#%'n Accordeon: ^7", s, "\n"));
+                                       break;
+                               case 2:
+                                       bprint(strcat("\{1}\{13}* ^3", self.owner.netname, "^3 played on the @!#%'n Klein Bottle: ^7", s, "\n"));
                                        break;
                        }
                }
@@ -145,6 +148,9 @@ float Tuba_GetNote(entity pl, float hittype)
        if(pl.movement_x > 0) movestate += 3;
        if(pl.movement_y < 0) movestate -= 1;
        if(pl.movement_y > 0) movestate += 1;
+#ifdef GMQCC
+       note = 0;
+#endif
        switch(movestate)
        {
        // layout: originally I wanted
@@ -160,6 +166,7 @@ float Tuba_GetNote(entity pl, float hittype)
                case 2: note = -5; break; // G
                case 3: note = -4; break; // G#
                case 4: note = +5; break; // e#
+               default:
                case 5: note =  0; break; // c
                case 6: note = +2; break; // d
                case 7: note = +3; break; // eb
@@ -179,7 +186,7 @@ float Tuba_GetNote(entity pl, float hittype)
        // that way, holes in the range of notes are "plugged"
        if(teamplay)
        {
-               if(pl.team == COLOR_TEAM2 || pl.team == COLOR_TEAM4)
+               if(pl.team == FL_TEAM_2 || pl.team == FL_TEAM_4)
                        note += 3;
        }
        else
@@ -283,8 +290,6 @@ void W_Tuba_NoteOn(float hittype)
                hittype |= HITTYPE_SECONDARY;
        if(self.tuba_instrument & 2)
                hittype |= HITTYPE_BOUNCE;
-       if(self.tuba_instrument & 4)
-               hittype |= HITTYPE_HEADSHOT;
 
        if(self.tuba_note)
        {
@@ -373,9 +378,10 @@ float w_tuba(float req)
                precache_model ("models/weapons/g_tuba.md3");
                precache_model ("models/weapons/v_tuba.md3");
                precache_model ("models/weapons/h_tuba.iqm");
-               precache_model ("models/weapons/g_akordeon.md3");
                precache_model ("models/weapons/v_akordeon.md3");
                precache_model ("models/weapons/h_akordeon.iqm");
+               precache_model ("models/weapons/v_kleinbottle.md3");
+               precache_model ("models/weapons/h_kleinbottle.iqm");
 
                //float i;
                //for(i = -18; i <= +27; ++i)
@@ -399,6 +405,10 @@ float w_tuba(float req)
                                        self.weaponname = "akordeon";
                                        break;
                                case 1:
+                                       self.tuba_instrument = 2;
+                                       self.weaponname = "kleinbottle";
+                                       break;
+                               case 2:
                                        self.tuba_instrument = 0;
                                        self.weaponname = "tuba";
                                        break;
@@ -413,6 +423,24 @@ 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)
+       {
+               if(w_deathtype & HITTYPE_BOUNCE)
+                       return WEAPON_ACCORDEON_SUICIDE;
+               else if(w_deathtype & HITTYPE_SECONDARY)
+                       return WEAPON_KLEINBOTTLE_SUICIDE;
+               else
+                       return WEAPON_TUBA_SUICIDE;
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_BOUNCE)
+                       return WEAPON_ACCORDEON_MURDER;
+               else if(w_deathtype & HITTYPE_SECONDARY)
+                       return WEAPON_KLEINBOTTLE_MURDER;
+               else
+                       return WEAPON_TUBA_MURDER;
+       }
        return TRUE;
 }
 #endif
@@ -427,6 +455,8 @@ float w_tuba(float req)
        {
                // nothing to do
        }
+/*<<<<<<< HEAD
+=======
        else if (req == WR_SUICIDEMESSAGE)
        {
                float instr;
@@ -435,8 +465,6 @@ float w_tuba(float req)
                        instr |= 1;
                if(w_deathtype & HITTYPE_BOUNCE)
                        instr |= 2;
-               if(w_deathtype & HITTYPE_HEADSHOT)
-                       instr |= 4;
                switch(instr)
                {
                        default:
@@ -446,6 +474,9 @@ float w_tuba(float req)
                        case 1: // Accordeon
                                w_deathtypestring = _("%s hurt his own ears with the @!#%%'n Accordeon");
                                break;
+                       case 2: // Klein Bottle
+                               w_deathtypestring = _("%s hurt his own ears with the @!#%%'n Klein Bottle");
+                               break;
                }
        }
        else if (req == WR_KILLMESSAGE)
@@ -456,8 +487,6 @@ float w_tuba(float req)
                        instr |= 1;
                if(w_deathtype & HITTYPE_BOUNCE)
                        instr |= 2;
-               if(w_deathtype & HITTYPE_HEADSHOT)
-                       instr |= 4;
                switch(instr)
                {
                        default:
@@ -467,8 +496,12 @@ float w_tuba(float req)
                        case 1: // Accordeon
                                w_deathtypestring = _("%s died of %s's great playing on the @!#%%'n Accordeon");
                                break;
+                       case 2: // Klein Bottle
+                               w_deathtypestring = _("%s died of %s's great playing on the @!#%%'n Klein Bottle");
+                               break;
                }
        }
+>>>>>>> origin/master*/
        return TRUE;
 }
 #endif