+#include "rifle.qh"
#ifndef IMPLEMENTATION
CLASS(Rifle, Weapon)
/* ammotype */ ATTRIB(Rifle, ammo_field, .int, ammo_nails);
/* rating */ ATTRIB(Rifle, bot_pickupbasevalue, float, BOT_PICKUP_RATING_MID);
/* color */ ATTRIB(Rifle, wpcolor, vector, '0.5 1 0');
/* modelname */ ATTRIB(Rifle, mdl, string, "campingrifle");
-#ifndef MENUQC
+#ifdef GAMEQC
/* model */ ATTRIB(Rifle, m_model, Model, MDL_RIFLE_ITEM);
#endif
/* crosshair */ ATTRIB(Rifle, w_crosshair, string, "gfx/crosshairrifle");
{
float i;
- W_DecreaseAmmo(thiswep, actor, pAmmo);
+ W_DecreaseAmmo(thiswep, actor, pAmmo, weaponentity);
W_SetupShot(actor, weaponentity, true, 2, pSound, CH_WEAPON_A, pDamage * pShots);
}
for(i = 0; i < pShots; ++i)
- fireBullet(actor, w_shotorg, w_shotdir, pSpread, pSolidPenetration, pDamage, pForce, deathtype, (pTracer ? EF_RED : EF_BLUE));
+ fireBullet(actor, weaponentity, w_shotorg, w_shotdir, pSpread, pSolidPenetration, pDamage, pForce, deathtype, (pTracer ? EF_RED : EF_BLUE));
if(autocvar_g_casings >= 2)
{
{
float r, af;
- Weapon sw = PS(actor).m_switchweapon; // make it not detect weapon changes as reason to abort firing
+ Weapon sw = actor.(weaponentity).m_switchweapon; // make it not detect weapon changes as reason to abort firing
int slot = weaponslot(weaponentity);
af = ATTACK_FINISHED(actor, slot);
- PS(actor).m_switchweapon = PS(actor).m_weapon;
+ actor.(weaponentity).m_switchweapon = actor.(weaponentity).m_weapon;
ATTACK_FINISHED(actor, slot) = time;
r = weapon_prepareattack(thiswep, actor, weaponentity, actor.rifle_bullethail_frame == WFRAME_FIRE2, actor.rifle_bullethail_refire);
- if(PS(actor).m_switchweapon == PS(actor).m_weapon)
- PS(actor).m_switchweapon = sw;
+ if(actor.(weaponentity).m_switchweapon == actor.(weaponentity).m_weapon)
+ actor.(weaponentity).m_switchweapon = sw;
if(r)
{
actor.rifle_bullethail_attackfunc(actor, weaponentity);