#pragma once

#ifdef GAMEQC
MODEL(SHOTGUN_MUZZLEFLASH, "models/uziflash.md3");
MODEL(SHOTGUN_VIEW, W_Model("h_shotgun.iqm"));
MODEL(SHOTGUN_WORLD, W_Model("v_shotgun.md3"));
MODEL(SHOTGUN_ITEM, W_Model("g_shotgun.md3"));

SOUND(SHOTGUN_FIRE, W_Sound("shotgun_fire"));
SOUND(SHOTGUN_MELEE, W_Sound("shotgun_melee"));
#endif

CLASS(Shotgun, Weapon)
#ifdef SVQC
/* spawnfunc */ ATTRIB(Shotgun, m_canonical_spawnfunc, string, "weapon_shotgun");
/* rating    */ ATTRIB(Shotgun, bot_pickupbasevalue, float, 6000);
#endif
/* ammotype  */ ATTRIB(Shotgun, ammo_type, Resource, RES_SHELLS);
/* impulse   */ ATTRIB(Shotgun, impulse, int, 2);
/* flags     */ ATTRIB(Shotgun, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN | WEP_TYPE_MELEE_SEC | WEP_FLAG_BLEED);
/* color     */ ATTRIB(Shotgun, m_color, vector, '0.518 0.608 0.659');
#ifdef GAMEQC
/* modelname */ ATTRIB(Shotgun, mdl, string, "shotgun");
/* model     */ ATTRIB(Shotgun, m_model, Model, MDL_SHOTGUN_ITEM);
/* flash mdl */ ATTRIB(Shotgun, m_muzzlemodel, Model, MDL_SHOTGUN_MUZZLEFLASH);
/* flash eff */ ATTRIB(Shotgun, m_muzzleeffect, entity, EFFECT_SHOTGUN_MUZZLEFLASH);
#endif
#ifdef CSQC
/* crosshair */ ATTRIB(Shotgun, w_crosshair, string, "gfx/crosshairshotgun");
/* crosshair */ ATTRIB(Shotgun, w_crosshair_size, float, 0.65);
#endif
/* wepimg    */ ATTRIB(Shotgun, model2, string, "weaponshotgun");
/* refname   */ ATTRIB(Shotgun, netname, string, "shotgun");
/* wepname   */ ATTRIB(Shotgun, m_name, string, _("Shotgun"));

#define X(BEGIN, P, END, class, prefix) \
	BEGIN(class) \
		P(class, prefix, alt_animtime, float, SEC) \
		P(class, prefix, alt_refire, float, SEC) \
		P(class, prefix, ammo, float, PRI) \
		P(class, prefix, animtime, float, BOTH) \
		P(class, prefix, bullets, float, PRI) \
		P(class, prefix, damage, float, BOTH) \
		P(class, prefix, damagefalloff_forcehalflife, float, PRI) \
		P(class, prefix, damagefalloff_halflife, float, PRI) \
		P(class, prefix, damagefalloff_maxdist, float, PRI) \
		P(class, prefix, damagefalloff_mindist, float, PRI) \
		P(class, prefix, force, float, BOTH) \
		P(class, prefix, melee_blockedbyfiring, bool, SEC) \
		P(class, prefix, melee_delay, float, SEC) \
		P(class, prefix, melee_multihit, float, SEC) \
		P(class, prefix, melee_nonplayerdamage, float, SEC) \
		P(class, prefix, melee_no_doubleslap, float, SEC) \
		P(class, prefix, melee_range, float, SEC) \
		P(class, prefix, melee_swing_side, float, SEC) \
		P(class, prefix, melee_swing_up, float, SEC) \
		P(class, prefix, melee_time, float, SEC) \
		P(class, prefix, melee_traces, float, SEC) \
		P(class, prefix, pickup_ammo, float, NONE) \
		P(class, prefix, refire, float, BOTH) \
		P(class, prefix, reload_ammo, float, NONE) \
		P(class, prefix, reload_time, float, NONE) \
		P(class, prefix, secondary, float, NONE) \
		P(class, prefix, solidpenetration, float, PRI) \
		P(class, prefix, spread, float, PRI) \
		P(class, prefix, spread_pattern, float, PRI) \
		P(class, prefix, spread_pattern_bias, float, PRI) \
		P(class, prefix, spread_pattern_scale, float, PRI) \
		P(class, prefix, switchdelay_drop, float, NONE) \
		P(class, prefix, switchdelay_raise, float, NONE) \
		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, Shotgun, shotgun)
#undef X

ENDCLASS(Shotgun)
REGISTER_WEAPON(SHOTGUN, NEW(Shotgun));

