]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/tuba.qc
Merge branch 'master' into Mario/wepent_experimental
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / tuba.qc
index 48469864ce22b42c47a1927eb8bb874a83d91b3a..786c96016911ad25e1164d9c12643ec74cbcdce7 100644 (file)
@@ -47,7 +47,6 @@ REGISTER_WEAPON(TUBA, tuba, NEW(Tuba));
 
 .entity tuba_note;
 .float tuba_smoketime;
-.float tuba_instrument;
 
 #define MAX_TUBANOTES 32
 .float tuba_lastnotes_last;
@@ -363,7 +362,7 @@ void W_Tuba_NoteOn(entity actor, .entity weaponentity, float hittype)
 #endif
 
 #ifdef SVQC
-METHOD(Tuba, wr_aim, void(Tuba this, entity actor))
+METHOD(Tuba, wr_aim, void(Tuba this, entity actor, .entity weaponentity))
 {
        // bots cannot play the Tuba well yet
        // I think they should start with the recorder first
@@ -403,41 +402,7 @@ METHOD(Tuba, wr_setup, void(Tuba this, entity actor, .entity weaponentity))
 {
        actor.(weaponentity).tuba_instrument = 0;
 }
-#endif
 
-REGISTER_NET_S2C(tuba_instrument)
-#ifdef CSQC
-NET_HANDLE(tuba_instrument, bool)
-{
-       int i = ReadByte();
-       int slot = ReadByte();
-       return = true;
-       string s = (i == 0) ? "tuba" :
-                  (i == 1) ? "akordeon" :
-                             "kleinbottle" ;
-
-    entity wep = viewmodels[slot];
-    CL_WeaponEntity_SetModel(wep, s, true);
-}
-#endif
-#ifdef SVQC
-void tuba_instrument_send(entity this, .entity weaponentity, int instr)
-{
-       msg_entity = this;
-       int chan = MSG_ONE;
-       WriteHeader(chan, tuba_instrument);
-       WriteByte(chan, instr);
-       WriteByte(chan, weaponslot(weaponentity));
-}
-SPECTATE_COPY()
-{
-       for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
-       {
-               .entity weaponentity = weaponentities[slot];
-               if(this.(weaponentity).tuba_instrument != spectatee.(weaponentity).tuba_instrument)
-                       tuba_instrument_send(this, weaponentity, this.(weaponentity).tuba_instrument = spectatee.(weaponentity).tuba_instrument);
-       }
-}
 METHOD(Tuba, wr_reload, void(Tuba this, entity actor, .entity weaponentity))
 {
        // switch to alternate instruments :)
@@ -458,7 +423,6 @@ METHOD(Tuba, wr_reload, void(Tuba this, entity actor, .entity weaponentity))
                                actor.(weaponentity).weaponname = "tuba";
                                break;
                }
-               tuba_instrument_send(actor, weaponentity, actor.(weaponentity).tuba_instrument);
                W_SetupShot(actor, weaponentity, false, 0, SND_Null, 0, 0);
                Send_Effect(EFFECT_TELEPORT, w_shotorg, '0 0 0', 1);
                actor.(weaponentity).state = WS_INUSE;
@@ -502,13 +466,6 @@ const int TUBA_MIN = -18;
 const int TUBA_MAX = 27;
 const int TUBA_INSTRUMENTS = 3;
 
-entityclass(Tuba);
-class(Tuba) .int note;
-class(Tuba) .bool tuba_attenuate;
-class(Tuba) .float tuba_volume;
-class(Tuba) .float tuba_volume_initial;
-class(Tuba) .int tuba_instrument;
-
 int Tuba_PitchStep;
 
 void tubasound(entity e, bool restart)