]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/rifle.qh
Merge branch 'bones_was_here/q1bsp_hitbox' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / rifle.qh
index b1c01b86ff861238a106b1d03a2b8dad77d8e55a..e5a2cde2b0b3956f3081c0889e5aa98d11b56390 100644 (file)
@@ -1,7 +1,8 @@
 #pragma once
 
 CLASS(Rifle, Weapon)
-/* ammotype  */ ATTRIB(Rifle, ammo_type, int, RESOURCE_BULLETS);
+/* spawnfunc */ ATTRIB(Rifle, m_canonical_spawnfunc, string, "weapon_rifle");
+/* ammotype  */ ATTRIB(Rifle, ammo_type, Resource, RES_BULLETS);
 /* impulse   */ ATTRIB(Rifle, impulse, int, 7);
 /* flags     */ ATTRIB(Rifle, spawnflags, int, WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN | WEP_FLAG_PENETRATEWALLS);
 /* rating    */ ATTRIB(Rifle, bot_pickupbasevalue, float, 7000);
@@ -9,6 +10,8 @@ CLASS(Rifle, Weapon)
 /* modelname */ ATTRIB(Rifle, mdl, string, "campingrifle");
 #ifdef GAMEQC
 /* model     */ ATTRIB(Rifle, m_model, Model, MDL_RIFLE_ITEM);
+/* flash mdl */ ATTRIB(Rifle, m_muzzlemodel, Model, MDL_Null);
+/* flash eff */ ATTRIB(Rifle, m_muzzleeffect, entity, EFFECT_RIFLE_MUZZLEFLASH);
 #endif
 /* crosshair */ ATTRIB(Rifle, w_crosshair, string, "gfx/crosshairrifle");
 /* crosshair */ ATTRIB(Rifle, w_crosshair_size, float, 0.6);
@@ -26,6 +29,7 @@ CLASS(Rifle, Weapon)
                P(class, prefix, bursttime, float, NONE) \
                P(class, prefix, damage, float, BOTH) \
                P(class, prefix, force, float, BOTH) \
+               P(class, prefix, headshot_multiplier, float, BOTH) \
                P(class, prefix, refire, float, BOTH) \
                P(class, prefix, reload, float, SEC) \
                P(class, prefix, reload_ammo, float, NONE) \
@@ -47,6 +51,9 @@ CLASS(Rifle, Weapon)
 ENDCLASS(Rifle)
 REGISTER_WEAPON(RIFLE, rifle, NEW(Rifle));
 
+SPAWNFUNC_WEAPON(weapon_rifle, WEP_RIFLE)
+SPAWNFUNC_WEAPON(weapon_campingrifle, WEP_RIFLE)
+SPAWNFUNC_WEAPON(weapon_sniperrifle, WEP_RIFLE)
 
 #ifdef SVQC
 .float rifle_accumulator;