.float weapon_nextthink;
.float weapon_eta_last;
.float weapon_switchdelay;
+.float tuba_instrument;
void viewmodel_draw(entity this)
{
static string name_last;
string name = wep.mdl;
bool swap = name != name_last;
+ if (wep == WEP_TUBA)
+ {
+ int i = me.tuba_instrument;
+ name = (i == 0) ? "tuba" :
+ (i == 1) ? "akordeon" :
+ "kleinbottle" ;
+ }
// if (swap)
{
name_last = name;
#ifdef IMPLEMENTATION
+.float tuba_instrument;
#ifdef SVQC
.entity tuba_note;
.float tuba_smoketime;
-.float tuba_instrument;
#define MAX_TUBANOTES 32
.float tuba_lastnotes_last;
}
}
}
-
-METHOD(Tuba, wr_setup, void(Tuba this, entity actor))
-{
- actor.ammo_field = ammo_none;
-// actor.tuba_instrument = 0;
-}
#endif
REGISTER_NET_S2C(tuba_instrument)
string s = (i == 0) ? "tuba" :
(i == 1) ? "akordeon" :
"kleinbottle" ;
- activeweapon.mdl = s;
+ csqcplayer.tuba_instrument = i;
CL_WeaponEntity_SetModel(viewmodel, s, true);
}
#endif
if (this.tuba_instrument != spectatee.tuba_instrument)
tuba_instrument_send(this, this.tuba_instrument = spectatee.tuba_instrument);
}
+
+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);
+}
+
METHOD(Tuba, wr_reload, void(Tuba this, entity actor, .entity weaponentity))
{
// switch to alternate instruments :)