#pragma once

#include <common/weapons/all.qh>

#ifdef GAMEQC
MODEL(RPC_MUZZLEFLASH, "models/flash.md3");
MODEL(RPC_VIEW, W_Model("h_ok_rl.iqm"));
MODEL(RPC_WORLD, W_Model("v_ok_rl.md3"));
MODEL(RPC_ITEM, W_Model("g_ok_rl.md3"));

SOUND(RPC_FIRE, W_Sound("rocket_fire"));
#endif

CLASS(OverkillRocketPropelledChainsaw, Weapon)
#ifdef SVQC
/* spawnfunc */ ATTRIB(OverkillRocketPropelledChainsaw, m_canonical_spawnfunc, string, "weapon_okrpc");
/* rating    */ ATTRIB(OverkillRocketPropelledChainsaw, bot_pickupbasevalue, float, 10000);
#endif
/* ammotype  */ ATTRIB(OverkillRocketPropelledChainsaw, ammo_type, Resource, RES_ROCKETS);
/* impulse   */ ATTRIB(OverkillRocketPropelledChainsaw, impulse, int, 9);
/* flags     */ ATTRIB(OverkillRocketPropelledChainsaw, spawnflags, int, WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_HIDDEN | WEP_FLAG_CANCLIMB | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH | WEP_FLAG_SUPERWEAPON);
/* color     */ ATTRIB(OverkillRocketPropelledChainsaw, m_color, vector, '0.914 0.745 0.341');
#ifdef GAMEQC
/* modelname */ ATTRIB(OverkillRocketPropelledChainsaw, mdl, string, "ok_rl");
/* model     */ ATTRIB(OverkillRocketPropelledChainsaw, m_model, Model, MDL_RPC_ITEM);
/* flash mdl */ ATTRIB(OverkillRocketPropelledChainsaw, m_muzzlemodel, Model, MDL_RPC_MUZZLEFLASH);
/* flash eff */ ATTRIB(OverkillRocketPropelledChainsaw, m_muzzleeffect, entity, EFFECT_ROCKET_MUZZLEFLASH);
#endif
#ifdef CSQC
/* crosshair */ ATTRIB(OverkillRocketPropelledChainsaw, w_crosshair, string, "gfx/crosshairrocketlauncher");
/* crosshair */ ATTRIB(OverkillRocketPropelledChainsaw, w_crosshair_size, float, 0.6);
#endif
/* wepimg    */ ATTRIB(OverkillRocketPropelledChainsaw, model2, string, "weaponrpc");
/* refname   */ ATTRIB(OverkillRocketPropelledChainsaw, netname, string, "okrpc");
/* wepname   */ ATTRIB(OverkillRocketPropelledChainsaw, m_name, string, _("Overkill Rocket Propelled Chainsaw"));
/* legacy    */ ATTRIB(OverkillRocketPropelledChainsaw, m_deprecated_netname, string, "rpc");

#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, damage2, float, PRI) \
		P(class, prefix, damageforcescale, float, PRI) \
		P(class, prefix, edgedamage, float, PRI) \
		P(class, prefix, force, float, PRI) \
		P(class, prefix, health, float, PRI) \
		P(class, prefix, lifetime, float, PRI) \
		P(class, prefix, radius, float, PRI) \
		P(class, prefix, refire, float, PRI) \
		P(class, prefix, speedaccel, float, PRI) \
		P(class, prefix, speed, 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, OverkillRocketPropelledChainsaw, okrpc)
#undef X

ENDCLASS(OverkillRocketPropelledChainsaw)
REGISTER_WEAPON(OVERKILL_RPC, NEW(OverkillRocketPropelledChainsaw));

//SPAWNFUNC_WEAPON(weapon_okrpc, WEP_OVERKILL_RPC)
//SPAWNFUNC_WEAPON(weapon_rpc, WEP_OVERKILL_RPC)
