#pragma once

#ifdef GAMEQC
MODEL(VAPORIZER_MUZZLEFLASH, "models/nexflash.md3");
MODEL(VAPORIZER_VIEW, W_Model("h_minstanex.iqm"));
MODEL(VAPORIZER_WORLD, W_Model("v_minstanex.md3"));
MODEL(VAPORIZER_ITEM, W_Model("g_minstanex.md3"));

SOUND(VAPORIZER_FIRE, W_Sound("minstanexfire"));
SOUND(VAPORIZER_IMPACT, W_Sound("neximpact"));
#endif

CLASS(Vaporizer, Weapon)
#ifdef SVQC
/* spawnfunc */ ATTRIB(Vaporizer, m_canonical_spawnfunc, string, "weapon_vaporizer");
/* rating    */ ATTRIB(Vaporizer, bot_pickupbasevalue, float, 10000);
#endif
/* ammotype  */ ATTRIB(Vaporizer, ammo_type, Resource, RES_CELLS);
/* impulse   */ ATTRIB(Vaporizer, impulse, int, 7);
/* flags     */ ATTRIB(Vaporizer, spawnflags, int, WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_FLAG_SUPERWEAPON | WEP_TYPE_HITSCAN | WEP_FLAG_NODUAL);
/* color     */ ATTRIB(Vaporizer, m_color, vector, '0.592 0.557 0.824');
#ifdef GAMEQC
/* modelname */ ATTRIB(Vaporizer, mdl, string, "minstanex");
/* model     */ ATTRIB(Vaporizer, m_model, Model, MDL_VAPORIZER_ITEM);
/* flash mdl */ ATTRIB(Vaporizer, m_muzzlemodel, Model, MDL_Null);
/* flash eff */ ATTRIB(Vaporizer, m_muzzleeffect, entity, EFFECT_VORTEX_MUZZLEFLASH);
#endif
#ifdef CSQC
/* crosshair */ ATTRIB(Vaporizer, w_crosshair, string, "gfx/crosshairminstanex");
/* crosshair */ ATTRIB(Vaporizer, w_crosshair_size, float, 0.6);
/* reticle   */ ATTRIB(Vaporizer, w_reticle, string, "gfx/reticle_nex");
#endif
/* wepimg    */ ATTRIB(Vaporizer, model2, string, "weaponminstanex");
/* refname   */ ATTRIB(Vaporizer, netname, string, "vaporizer");
/* wepname   */ ATTRIB(Vaporizer, m_name, string, _("Vaporizer"));
/* legacy    */ ATTRIB(Vaporizer, m_deprecated_netname, string, "minstanex");

#define X(BEGIN, P, END, class, prefix) \
	BEGIN(class) \
		P(class, prefix, ammo, float, PRI) \
		P(class, prefix, animtime, float, PRI) \
		P(class, prefix, damage, float, PRI) \
		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, PRI) \
		P(class, prefix, pickup_ammo, float, NONE) \
		P(class, prefix, refire, float, PRI) \
		P(class, prefix, reload_ammo, float, NONE) \
		P(class, prefix, reload_time, float, NONE) \
		P(class, prefix, switchdelay_raise, float, NONE) \
		P(class, prefix, switchdelay_drop, float, NONE) \
		P(class, prefix, weaponreplace, string, NONE) \
		P(class, prefix, weaponstart, float, NONE) \
		P(class, prefix, weaponstartoverride, float, NONE) \
		P(class, prefix, weaponthrowable, float, NONE) \
	END()
	W_PROPS(X, Vaporizer, vaporizer)
#undef X

ENDCLASS(Vaporizer)
REGISTER_WEAPON(VAPORIZER, NEW(Vaporizer));

SPAWNFUNC_WEAPON(weapon_vaporizer, WEP_VAPORIZER)
SPAWNFUNC_WEAPON(weapon_minstanex, WEP_VAPORIZER)

#ifdef SVQC
.float vaporizer_lasthit;
.float jump_interval;
.float jump_interval2;
.int rm_laser_count;
#endif
