+#include "tuba.qh"
#ifndef IMPLEMENTATION
CLASS(Tuba, Weapon)
-/* impulse */ ATTRIB(Tuba, impulse, int, 1)
+/* impulse */ ATTRIB(Tuba, impulse, int, 1);
/* flags */ ATTRIB(Tuba, spawnflags, int, WEP_FLAG_HIDDEN | WEP_TYPE_SPLASH);
/* rating */ ATTRIB(Tuba, bot_pickupbasevalue, float, BOT_PICKUP_RATING_MID);
/* color */ ATTRIB(Tuba, wpcolor, vector, '0 1 0');
/* modelname */ ATTRIB(Tuba, mdl, string, "tuba");
-#ifndef MENUQC
+#ifdef GAMEQC
/* model */ ATTRIB(Tuba, m_model, Model, MDL_TUBA_ITEM);
#endif
/* crosshair */ ATTRIB(Tuba, w_crosshair, string, "gfx/crosshairtuba");
METHOD(Tuba, wr_setup, void(Tuba this, entity actor))
{
- actor.ammo_field = ammo_none;
actor.tuba_instrument = 0;
}
#endif
string s = (i == 0) ? "tuba" :
(i == 1) ? "akordeon" :
"kleinbottle" ;
- CL_WeaponEntity_SetModel(viewmodel, s, true);
+ for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
+ {
+ entity wep = viewmodels[slot];
+ if(wep.activeweapon == WEP_TUBA)
+ CL_WeaponEntity_SetModel(wep, s, true);
+ }
}
#endif
#ifdef SVQC
{
case 0:
actor.tuba_instrument = 1;
- actor.weaponname = "akordeon";
+ actor.(weaponentity).weaponname = "akordeon";
break;
case 1:
actor.tuba_instrument = 2;
- actor.weaponname = "kleinbottle";
+ actor.(weaponentity).weaponname = "kleinbottle";
break;
case 2:
actor.tuba_instrument = 0;
- actor.weaponname = "tuba";
+ actor.(weaponentity).weaponname = "tuba";
break;
}
tuba_instrument_send(actor, actor.tuba_instrument);
#ifdef SVQC
// infinite ammo
-METHOD(Tuba, wr_checkammo1, bool(Tuba this, entity actor)) { return true; }
-METHOD(Tuba, wr_checkammo2, bool(Tuba this, entity actor)) { return true; }
+METHOD(Tuba, wr_checkammo1, bool(Tuba this, entity actor, .entity weaponentity)) { return true; }
+METHOD(Tuba, wr_checkammo2, bool(Tuba this, entity actor, .entity weaponentity)) { return true; }
METHOD(Tuba, wr_suicidemessage, Notification(Tuba this))
{