#pragma once

#include <common/weapons/all.qh>

#ifdef GAMEQC
MODEL(HMG_MUZZLEFLASH, "models/uziflash.md3");
MODEL(HMG_VIEW, W_Model("h_ok_hmg.iqm"));
MODEL(HMG_WORLD, W_Model("v_ok_hmg.md3"));
MODEL(HMG_ITEM, W_Model("g_ok_hmg.md3"));

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

CLASS(OverkillHeavyMachineGun, Weapon)
#ifdef SVQC
/* spawnfunc */ ATTRIB(OverkillHeavyMachineGun, m_canonical_spawnfunc, string, "weapon_okhmg");
/* rating    */ ATTRIB(OverkillHeavyMachineGun, bot_pickupbasevalue, float, 10000);
#endif
/* ammotype  */ ATTRIB(OverkillHeavyMachineGun, ammo_type, Resource, RES_BULLETS);
/* impulse   */ ATTRIB(OverkillHeavyMachineGun, impulse, int, 3);
/* flags     */ ATTRIB(OverkillHeavyMachineGun, spawnflags, int, WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_HIDDEN | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN | WEP_FLAG_SUPERWEAPON | WEP_FLAG_PENETRATEWALLS);
/* color     */ ATTRIB(OverkillHeavyMachineGun, m_color, vector, '0.992 0.471 0.396');
#ifdef GAMEQC
/* modelname */ ATTRIB(OverkillHeavyMachineGun, mdl, string, "ok_hmg");
/* model     */ ATTRIB(OverkillHeavyMachineGun, m_model, Model, MDL_HMG_ITEM);
/* flash mdl */ ATTRIB(OverkillHeavyMachineGun, m_muzzlemodel, Model, MDL_HMG_MUZZLEFLASH);
/* flash eff */ ATTRIB(OverkillHeavyMachineGun, m_muzzleeffect, entity, EFFECT_MACHINEGUN_MUZZLEFLASH);
#endif
#ifdef CSQC
/* crosshair */ ATTRIB(OverkillHeavyMachineGun, w_crosshair, string, "gfx/crosshairuzi");
/* crosshair */ ATTRIB(OverkillHeavyMachineGun, w_crosshair_size, float, 0.6);
#endif
/* wepimg    */ ATTRIB(OverkillHeavyMachineGun, model2, string, "weaponhmg");
/* refname   */ ATTRIB(OverkillHeavyMachineGun, netname, string, "okhmg");
/* wepname   */ ATTRIB(OverkillHeavyMachineGun, m_name, string, _("Overkill Heavy MachineGun"));
/* legacy    */ ATTRIB(OverkillHeavyMachineGun, m_deprecated_netname, string, "hmg");

#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, 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, OverkillHeavyMachineGun, okhmg)
#undef X

ENDCLASS(OverkillHeavyMachineGun)
REGISTER_WEAPON(OVERKILL_HMG, NEW(OverkillHeavyMachineGun));

//SPAWNFUNC_WEAPON(weapon_okhmg, WEP_OVERKILL_HMG)
//SPAWNFUNC_WEAPON(weapon_hmg, WEP_OVERKILL_HMG)
