#pragma once CLASS(Rifle, Weapon) /* spawnfunc */ ATTRIB(Rifle, m_canonical_spawnfunc, string, "weapon_rifle"); /* ammotype */ ATTRIB(Rifle, ammo_type, Resource, RES_BULLETS); /* impulse */ ATTRIB(Rifle, impulse, int, 7); /* flags */ ATTRIB(Rifle, spawnflags, int, WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN | WEP_FLAG_PENETRATEWALLS); /* rating */ ATTRIB(Rifle, bot_pickupbasevalue, float, 7000); /* color */ ATTRIB(Rifle, wpcolor, vector, '0.5 1 0'); /* modelname */ ATTRIB(Rifle, mdl, string, "campingrifle"); #ifdef GAMEQC /* model */ ATTRIB(Rifle, m_model, Model, MDL_RIFLE_ITEM); /* flash mdl */ ATTRIB(Rifle, m_muzzlemodel, Model, MDL_Null); /* flash eff */ ATTRIB(Rifle, m_muzzleeffect, entity, EFFECT_RIFLE_MUZZLEFLASH); #endif /* crosshair */ ATTRIB(Rifle, w_crosshair, string, "gfx/crosshairrifle"); /* crosshair */ ATTRIB(Rifle, w_crosshair_size, float, 0.6); /* reticle */ ATTRIB(Rifle, w_reticle, string, "gfx/reticle_nex"); /* wepimg */ ATTRIB(Rifle, model2, string, "weaponrifle"); /* refname */ ATTRIB(Rifle, netname, string, "rifle"); /* wepname */ ATTRIB(Rifle, m_name, string, _("Rifle")); #define X(BEGIN, P, END, class, prefix) \ BEGIN(class) \ P(class, prefix, ammo, float, BOTH) \ P(class, prefix, animtime, float, BOTH) \ P(class, prefix, bullethail, float, BOTH) \ P(class, prefix, burstcost, float, BOTH) \ P(class, prefix, bursttime, float, NONE) \ P(class, prefix, damage, float, BOTH) \ P(class, prefix, damagefalloff_forcehalflife, float, BOTH) \ P(class, prefix, damagefalloff_halflife, float, BOTH) \ P(class, prefix, damagefalloff_maxdist, float, BOTH) \ P(class, prefix, damagefalloff_mindist, float, BOTH) \ P(class, prefix, force, float, BOTH) \ P(class, prefix, headshot_multiplier, float, BOTH) \ P(class, prefix, refire, float, BOTH) \ P(class, prefix, reload, float, SEC) \ P(class, prefix, reload_ammo, float, NONE) \ P(class, prefix, reload_time, float, NONE) \ P(class, prefix, secondary, float, NONE) \ P(class, prefix, shots, float, BOTH) \ P(class, prefix, solidpenetration, float, BOTH) \ P(class, prefix, spread, float, BOTH) \ P(class, prefix, switchdelay_drop, float, NONE) \ P(class, prefix, switchdelay_raise, float, NONE) \ P(class, prefix, tracer, float, BOTH) \ P(class, prefix, weaponreplace, string, NONE) \ P(class, prefix, weaponstartoverride, float, NONE) \ P(class, prefix, weaponstart, float, NONE) \ P(class, prefix, weaponthrowable, float, NONE) \ END() W_PROPS(X, Rifle, rifle) #undef X ENDCLASS(Rifle) REGISTER_WEAPON(RIFLE, NEW(Rifle)); SPAWNFUNC_WEAPON(weapon_rifle, WEP_RIFLE) SPAWNFUNC_WEAPON(weapon_campingrifle, WEP_RIFLE) SPAWNFUNC_WEAPON(weapon_sniperrifle, WEP_RIFLE) #ifdef SVQC .float rifle_accumulator; #endif