X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fweapon%2Fhook.qh;h=25b1be5073aa14542acc2e85802320597615c259;hb=71eb8f743b4e5cb924087f07995a6ef3f2180861;hp=f67db3d00d462ac141c52be86adc2d6879b49bdb;hpb=fb5876e8defeb6af31e62002be26bdfa2beb56a7;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/weapons/weapon/hook.qh b/qcsrc/common/weapons/weapon/hook.qh index f67db3d00..25b1be507 100644 --- a/qcsrc/common/weapons/weapon/hook.qh +++ b/qcsrc/common/weapons/weapon/hook.qh @@ -1,14 +1,17 @@ #pragma once CLASS(Hook, Weapon) -/* ammotype */ ATTRIB(Hook, ammo_field, .int, ammo_fuel); +/* spawnfunc */ ATTRIB(Hook, m_canonical_spawnfunc, string, "weapon_hook"); +/* ammotype */ ATTRIB(Hook, ammo_type, Resource, RES_FUEL); /* impulse */ ATTRIB(Hook, impulse, int, 0); -/* flags */ ATTRIB(Hook, spawnflags, int, WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH); +/* flags */ ATTRIB(Hook, spawnflags, int, WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH | WEP_FLAG_NOTRUEAIM); /* rating */ ATTRIB(Hook, bot_pickupbasevalue, float, 0); /* color */ ATTRIB(Hook, wpcolor, vector, '0 0.5 0'); /* modelname */ ATTRIB(Hook, mdl, string, "hookgun"); #ifdef GAMEQC /* model */ ATTRIB(Hook, m_model, Model, MDL_HOOK_ITEM); +/* flash mdl */ ATTRIB(Hook, m_muzzlemodel, Model, MDL_Null); +/* flash eff */ ATTRIB(Hook, m_muzzleeffect, entity, EFFECT_HOOK_MUZZLEFLASH); #endif /* crosshair */ ATTRIB(Hook, w_crosshair, string, "gfx/crosshairhook"); /* crosshair */ ATTRIB(Hook, w_crosshair_size, float, 0.5); @@ -49,6 +52,8 @@ CLASS(Hook, Weapon) ENDCLASS(Hook) REGISTER_WEAPON(HOOK, hook, NEW(Hook)); +SPAWNFUNC_WEAPON(weapon_hook, WEP_HOOK) + CLASS(OffhandHook, OffhandWeapon) #ifdef SVQC METHOD(OffhandHook, offhand_think, void(OffhandHook this, entity actor, bool key_pressed)) @@ -59,7 +64,8 @@ CLASS(OffhandHook, OffhandWeapon) } #endif ENDCLASS(OffhandHook) -OffhandHook OFFHAND_HOOK; STATIC_INIT(OFFHAND_HOOK) { OFFHAND_HOOK = NEW(OffhandHook); } +OffhandHook OFFHAND_HOOK; +STATIC_INIT(OFFHAND_HOOK) { OFFHAND_HOOK = NEW(OffhandHook); } #ifdef SVQC