.entity tuba_note;
.float tuba_smoketime;
-.float tuba_instrument;
#define MAX_TUBANOTES 32
.float tuba_lastnotes_last;
{
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);
+ this.(weaponentity).tuba_instrument = spectatee.(weaponentity).tuba_instrument;
}
}
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;
class(Tuba) .bool tuba_attenuate;
class(Tuba) .float tuba_volume;
class(Tuba) .float tuba_volume_initial;
-class(Tuba) .int tuba_instrument;
int Tuba_PitchStep;
.float w_vortex_charge;
.int w_m_gunalign;
.bool w_porto_v_angle_held;
+ .int w_tuba_instrument;
#endif
// #define PROP(public, fld, set, sv, cl)
{ (viewmodels[this.m_wepent_slot]).angles_held_status = ReadByte(); if((viewmodels[this.m_wepent_slot]).angles_held_status) { \
(viewmodels[this.m_wepent_slot]).angles_held_x = ReadAngle(); (viewmodels[this.m_wepent_slot]).angles_held_y = ReadAngle(); (viewmodels[this.m_wepent_slot]).angles_held_z = 0; } \
else { (viewmodels[this.m_wepent_slot]).angles_held = '0 0 0'; } }) \
+ \
+ PROP(false, tuba_instrument, WEPENT_SET_NORMAL, \
+ { WriteByte(chan, this.tuba_instrument); }, \
+ { (viewmodels[this.m_wepent_slot]).tuba_instrument = ReadByte(); }) \
\
/**/