From: Lyberta Date: Sat, 25 Nov 2017 06:09:30 +0000 (+0300) Subject: OK weapons: Synced with master. X-Git-Tag: xonotic-v0.8.5~2119^2~49 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2b58aea4138b82cd34f025835393a47f0619e56f;p=xonotic%2Fxonotic-data.pk3dir.git OK weapons: Synced with master. --- diff --git a/qcsrc/common/mutators/mutator/overkill/okmachinegun.qc b/qcsrc/common/mutators/mutator/overkill/okmachinegun.qc index d2ed859f9..4b9e69e30 100644 --- a/qcsrc/common/mutators/mutator/overkill/okmachinegun.qc +++ b/qcsrc/common/mutators/mutator/overkill/okmachinegun.qc @@ -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; diff --git a/qcsrc/common/mutators/mutator/overkill/okmachinegun.qh b/qcsrc/common/mutators/mutator/overkill/okmachinegun.qh index 24987c5a0..1b085df7d 100644 --- a/qcsrc/common/mutators/mutator/overkill/okmachinegun.qh +++ b/qcsrc/common/mutators/mutator/overkill/okmachinegun.qh @@ -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) diff --git a/qcsrc/common/mutators/mutator/overkill/okshotgun.qc b/qcsrc/common/mutators/mutator/overkill/okshotgun.qc index 8f606bd3b..3a7143f78 100644 --- a/qcsrc/common/mutators/mutator/overkill/okshotgun.qc +++ b/qcsrc/common/mutators/mutator/overkill/okshotgun.qc @@ -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))) diff --git a/qcsrc/common/mutators/mutator/overkill/okshotgun.qh b/qcsrc/common/mutators/mutator/overkill/okshotgun.qh index 1b6582aa8..59519f84a 100644 --- a/qcsrc/common/mutators/mutator/overkill/okshotgun.qh +++ b/qcsrc/common/mutators/mutator/overkill/okshotgun.qh @@ -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) diff --git a/qcsrc/common/mutators/mutator/overkill/okvortex.qc b/qcsrc/common/mutators/mutator/overkill/okvortex.qc index 6b37b0db6..cef11b95c 100644 --- a/qcsrc/common/mutators/mutator/overkill/okvortex.qc +++ b/qcsrc/common/mutators/mutator/overkill/okvortex.qc @@ -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) diff --git a/qcsrc/common/mutators/mutator/overkill/okvortex.qh b/qcsrc/common/mutators/mutator/overkill/okvortex.qh index ebc2f3446..c46a38fdd 100644 --- a/qcsrc/common/mutators/mutator/overkill/okvortex.qh +++ b/qcsrc/common/mutators/mutator/overkill/okvortex.qh @@ -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) diff --git a/randomitems-xonotic.cfg b/randomitems-xonotic.cfg index 803e6c3ae..ebfbe7bec 100644 --- a/randomitems-xonotic.cfg +++ b/randomitems-xonotic.cfg @@ -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."