]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
OK weapons: Synced with master.
authorLyberta <lyberta@lyberta.net>
Sat, 25 Nov 2017 06:09:30 +0000 (09:09 +0300)
committerLyberta <lyberta@lyberta.net>
Sat, 25 Nov 2017 06:09:30 +0000 (09:09 +0300)
qcsrc/common/mutators/mutator/overkill/okmachinegun.qc
qcsrc/common/mutators/mutator/overkill/okmachinegun.qh
qcsrc/common/mutators/mutator/overkill/okshotgun.qc
qcsrc/common/mutators/mutator/overkill/okshotgun.qh
qcsrc/common/mutators/mutator/overkill/okvortex.qc
qcsrc/common/mutators/mutator/overkill/okvortex.qh
randomitems-xonotic.cfg

index d2ed859f98cd380d6069417cf4acf1d0e56f8487..4b9e69e302031ec3e29e80f6c53cbb069af2d38e 100644 (file)
@@ -2,17 +2,6 @@
 
 #ifdef SVQC
 
-spawnfunc(weapon_okmachinegun)
-{
-       if(autocvar_sv_q3acompat_machineshotgunswap)
-       if(this.classname != "droppedweapon")
-       {
-               weapon_defaultspawnfunc(this, WEP_SHOCKWAVE);
-               return;
-       }
-       weapon_defaultspawnfunc(this, WEP_OVERKILL_MACHINEGUN);
-}
-
 void W_OverkillMachineGun_Attack_Auto(Weapon thiswep, entity actor, .entity weaponentity, int fire)
 {
        float okmachinegun_spread;
index 24987c5a020b4250cc9d5a6a956bdfd95b3daad7..1b085df7d41d938633dc7a49ff841c4209ac5eba 100644 (file)
@@ -1,6 +1,7 @@
 #pragma once
 
 CLASS(OverkillMachineGun, Weapon)
+/* spawnfunc */ ATTRIB(OverkillMachineGun, m_canonical_spawnfunc, string, "weapon_okmachinegun");
 /* ammotype  */ ATTRIB(OverkillMachineGun, ammo_type, int, RESOURCE_BULLETS);
 /* impulse   */ ATTRIB(OverkillMachineGun, impulse, int, 3);
 /* flags        */ ATTRIB(OverkillMachineGun, spawnflags, int, WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN | WEP_FLAG_PENETRATEWALLS);
@@ -53,3 +54,4 @@ CLASS(OverkillMachineGun, Weapon)
 ENDCLASS(OverkillMachineGun)
 REGISTER_WEAPON(OVERKILL_MACHINEGUN, okmachinegun, NEW(OverkillMachineGun));
 
+SPAWNFUNC_WEAPON(weapon_okmachinegun, WEP_OVERKILL_MACHINEGUN)
index 8f606bd3b01e6102e884c77ac7125230f8a94925..3a7143f780863711f4bb077df0d2b36ce741d1b0 100644 (file)
@@ -1,8 +1,6 @@
 #include "okshotgun.qh"
 
 #ifdef SVQC
-spawnfunc(weapon_okshotgun) { weapon_defaultspawnfunc(this, WEP_OVERKILL_SHOTGUN); }
-
 METHOD(OverkillShotgun, wr_aim, void(entity thiswep, entity actor, .entity weaponentity))
 {
        if (vdist(actor.origin - actor.enemy.origin, >, WEP_CVAR_PRI(okshotgun, bot_range)))
index 1b6582aa8f5cdd4c0bfe735d49f407d45005eb72..59519f84afd061e54cb8ce0929dcf79ce47db62a 100644 (file)
@@ -1,6 +1,7 @@
 #pragma once
 
 CLASS(OverkillShotgun, Weapon)
+/* spawnfunc */ ATTRIB(OverkillShotgun, m_canonical_spawnfunc, string, "weapon_okshotgun");
 /* ammotype  */ ATTRIB(OverkillShotgun, ammo_type, int, RESOURCE_SHELLS);
 /* impulse   */ ATTRIB(OverkillShotgun, impulse, int, 2);
 /* flags     */ ATTRIB(OverkillShotgun, spawnflags, int, WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN);
@@ -53,3 +54,5 @@ CLASS(OverkillShotgun, Weapon)
 
 ENDCLASS(OverkillShotgun)
 REGISTER_WEAPON(OVERKILL_SHOTGUN, okshotgun, NEW(OverkillShotgun));
+
+SPAWNFUNC_WEAPON(weapon_okshotgun, WEP_OVERKILL_SHOTGUN)
index 6b37b0db6d0b8714f72ce0672494a0e0a943eed4..cef11b95c5b3d9730f486ccbc2e99e3ae5ccc643 100644 (file)
@@ -27,8 +27,6 @@ METHOD(OverkillVortex, wr_glow, vector(OverkillVortex this, entity actor, entity
 #endif
 
 #ifdef SVQC
-spawnfunc(weapon_okvortex) { weapon_defaultspawnfunc(this, WEP_OVERKILL_VORTEX); }
-
 REGISTER_MUTATOR(okvortex_charge, true);
 
 MUTATOR_HOOKFUNCTION(okvortex_charge, GetPressedKeys)
index ebc2f344606cae3f6096c11d39e52f42438430a4..c46a38fdd5a773bf858c41acb71a11a2fc73f7dd 100644 (file)
@@ -1,6 +1,7 @@
 #pragma once
 
 CLASS(OverkillVortex, Weapon)
+/* spawnfunc */ ATTRIB(OverkillVortex, m_canonical_spawnfunc, string, "weapon_okvortex");
 /* ammotype  */ ATTRIB(OverkillVortex, ammo_type, int, RESOURCE_CELLS);
 /* impulse   */ ATTRIB(OverkillVortex, impulse, int, 7);
 /* flags     */ ATTRIB(OverkillVortex, spawnflags, int, WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN);
@@ -72,3 +73,5 @@ CLASS(OverkillVortex, Weapon)
 ENDCLASS(OverkillVortex)
 REGISTER_WEAPON(OVERKILL_VORTEX, okvortex, NEW(OverkillVortex));
 
+
+SPAWNFUNC_WEAPON(weapon_okvortex, WEP_OVERKILL_VORTEX)
index 803e6c3ae8aa1e83f465a05d28a1ec9bff8a23e0..ebfbe7becfacf095e26b6a4f58ce66826aff2f0f 100644 (file)
@@ -29,6 +29,9 @@ set g_random_items_replace_weapon_shockwave "random" "Classnames to replace shoc
 set g_random_items_replace_weapon_arc "random" "Classnames to replace arc with."
 set g_random_items_replace_weapon_hook "random" "Classnames to replace hook with."
 set g_random_items_replace_weapon_tuba "random" "Classnames to replace tuba with."
+set g_random_items_replace_weapon_okshotgun "random" "Classnames to replace overkill shotgun with."
+set g_random_items_replace_weapon_okmachinegun "random" "Classnames to replace overkill machinegun with."
+set g_random_items_replace_weapon_okvortex "random" "Classnames to replace overkill vortex with."
 set g_random_items_replace_weapon_porto "random" "Classnames to replace port-o-launch with."
 set g_random_items_replace_weapon_fireball "random" "Classnames to replace fireball with."
 set g_random_items_replace_weapon_minelayer "random" "Classnames to replace mine layer with."
@@ -78,6 +81,9 @@ set g_random_items_weapon_shockwave_probability 0 "Probability of random shockwa
 set g_random_items_weapon_arc_probability 0 "Probability of random arc spawning in the map."
 set g_random_items_weapon_hook_probability 0 "Probability of random hook spawning in the map."
 set g_random_items_weapon_tuba_probability 0 "Probability of random tuba spawning in the map."
+set g_random_items_weapon_okshotgun_probability 0 "Probability of random overkill shotgun spawning in the map."
+set g_random_items_weapon_okmachinegun_probability 0 "Probability of random overkill machinegun spawning in the map."
+set g_random_items_weapon_okvortex_probability 0 "Probability of random overkill vortex spawning in the map."
 set g_random_items_weapon_porto_probability 0 "Probability of random port-o-launch spawning in the map."
 set g_random_items_weapon_fireball_probability 0 "Probability of random fireball spawning in the map."
 set g_random_items_weapon_minelayer_probability 0 "Probability of random mine layer spawning in the map."
@@ -139,6 +145,9 @@ set g_random_loot_weapon_shockwave_probability 0 "Probability of random shockwav
 set g_random_loot_weapon_arc_probability 0 "Probability of random arc spawning as loot."
 set g_random_loot_weapon_hook_probability 0 "Probability of random hook spawning as loot."
 set g_random_loot_weapon_tuba_probability 0 "Probability of random tuba spawning as loot."
+set g_random_loot_weapon_okshotgun_probability 0 "Probability of random overkill shotgun spawning as loot."
+set g_random_loot_weapon_okmachinegun_probability 0 "Probability of random overkill machinegun spawning as loot."
+set g_random_loot_weapon_okvortex_probability 0 "Probability of random overkill vortex spawning as loot."
 set g_random_loot_weapon_porto_probability 0 "Probability of random port-o-launch spawning as loot."
 set g_random_loot_weapon_fireball_probability 0 "Probability of random fireball spawning as loot."
 set g_random_loot_weapon_minelayer_probability 0 "Probability of random mine layer spawning as loot."