#pragma once

#ifdef GAMEQC
MODEL(OK_MG_VIEW, W_Model("h_ok_mg.iqm"));
MODEL(OK_MG_WORLD, W_Model("v_ok_mg.md3"));
MODEL(OK_MG_ITEM, W_Model("g_ok_mg.md3"));

SOUND(OK_MG_FIRE, W_Sound("uzi_fire"));
#endif

CLASS(OverkillMachineGun, Weapon)
#ifdef SVQC
/* spawnfunc */ ATTRIB(OverkillMachineGun, m_canonical_spawnfunc, string, "weapon_okmachinegun");
/* rating    */ ATTRIB(OverkillMachineGun, bot_pickupbasevalue, float, 7000);
#endif
/* ammotype  */ ATTRIB(OverkillMachineGun, ammo_type, Resource, RES_BULLETS);
/* impulse   */ ATTRIB(OverkillMachineGun, impulse, int, 3);
/* flags     */ ATTRIB(OverkillMachineGun, spawnflags, int, WEP_FLAG_HIDDEN | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN | WEP_FLAG_PENETRATEWALLS | WEP_FLAG_MUTATORBLOCKED);
/* color     */ ATTRIB(OverkillMachineGun, m_color, vector, '0.678 0.886 0.267');
#ifdef GAMEQC
/* modelname */ ATTRIB(OverkillMachineGun, mdl, string, "ok_mg");
/* model     */ ATTRIB(OverkillMachineGun, m_model, Model, MDL_OK_MG_ITEM);
/* flash mdl */ ATTRIB(OverkillMachineGun, m_muzzlemodel, Model, MDL_MACHINEGUN_MUZZLEFLASH);
/* flash eff */ ATTRIB(OverkillMachineGun, m_muzzleeffect, entity, EFFECT_MACHINEGUN_MUZZLEFLASH);
#endif
#ifdef CSQC
/* crosshair */ ATTRIB(OverkillMachineGun, w_crosshair, string, "gfx/crosshairuzi");
/* crosshair */ ATTRIB(OverkillMachineGun, w_crosshair_size, float, 0.6);
#endif
/* wepimg    */ ATTRIB(OverkillMachineGun, model2, string, "ok_weapon_smg");
/* refname   */ ATTRIB(OverkillMachineGun, netname, string, "okmachinegun");
/* wepname   */ ATTRIB(OverkillMachineGun, m_name, string, _("Overkill MachineGun"));

#define X(BEGIN, P, END, class, prefix) \
	BEGIN(class) \
		P(class, prefix, ammo, float, PRI) \
		P(class, prefix, damage, float, PRI) \
		P(class, prefix, force, float, PRI) \
		P(class, prefix, refire, float, PRI) \
		P(class, prefix, solidpenetration, float, PRI) \
		P(class, prefix, spread_add, float, PRI) \
		P(class, prefix, spread_max, float, PRI) \
		P(class, prefix, spread_min, float, PRI) \
		P(class, prefix, refire_type, float, SEC) \
		P(class, prefix, damagefalloff_forcehalflife, float, NONE) \
		P(class, prefix, damagefalloff_halflife, float, NONE) \
		P(class, prefix, damagefalloff_maxdist, float, NONE) \
		P(class, prefix, damagefalloff_mindist, float, NONE) \
		P(class, prefix, reload_ammo, float, NONE) \
		P(class, prefix, reload_time, float, NONE) \
		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, OverkillMachineGun, okmachinegun)
#undef X

ENDCLASS(OverkillMachineGun)
REGISTER_WEAPON(OVERKILL_MACHINEGUN, NEW(OverkillMachineGun));

//SPAWNFUNC_WEAPON(weapon_okmachinegun, WEP_OVERKILL_MACHINEGUN)
