#include <common/triggers/target/music.qh>
#include <common/teams.qh>
+#include <common/weapons/weapon/tuba.qh>
+
#include <common/vehicles/all.qh>
#include <common/weapons/_all.qh>
#include <common/viewloc.qh>
{
static string name_last;
string name = wep.mdl;
+ if(wep == WEP_TUBA)
+ {
+ name = (this.tuba_instrument == 0) ? "tuba" :
+ (this.tuba_instrument == 1) ? "akordeon" :
+ "kleinbottle";
+ }
bool swap = name != name_last;
// if (swap)
{
}
}
+void tuba_instrument_send(entity this, int instr);
METHOD(Tuba, wr_setup, void(Tuba this, entity actor))
{
actor.ammo_field = ammo_none;
actor.tuba_instrument = 0;
+ tuba_instrument_send(actor, actor.tuba_instrument);
}
#endif
string s = (i == 0) ? "tuba" :
(i == 1) ? "akordeon" :
"kleinbottle" ;
+ viewmodel.tuba_instrument = i;
CL_WeaponEntity_SetModel(viewmodel, s, true);
}
#endif
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)
#pragma once
+
+#ifdef CSQC
+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;
+#endif