Merge branch 'master' into Lyberta/StandaloneOverkillWeapons
authorLyberta <lyberta@lyberta.net>
Sat, 25 Nov 2017 04:34:02 +0000 (07:34 +0300)
committerLyberta <lyberta@lyberta.net>
Sat, 25 Nov 2017 04:34:02 +0000 (07:34 +0300)
1  2 
defaultServer.cfg
qcsrc/common/mutators/mutator/overkill/hmg.qc
qcsrc/common/mutators/mutator/overkill/hmg.qh
qcsrc/common/mutators/mutator/overkill/rpc.qc
qcsrc/common/mutators/mutator/overkill/rpc.qh
qcsrc/common/mutators/mutator/overkill/sv_overkill.qc
qcsrc/common/stats.qh
qcsrc/common/weapons/weapon/shotgun.qc
qcsrc/server/client.qc
qcsrc/server/defs.qh

Simple merge
@@@ -24,7 -15,31 +15,31 @@@ REGISTER_MUTATOR(ok, expr_evaluate(auto
  {
        MUTATOR_ONADD
        {
-               ok_Initialize();
+               precache_all_playermodels("models/ok_player/*.dpm");
+               if (autocvar_g_overkill_filter_healthmega)
+               {
+                       ITEM_HealthMega.spawnflags |= ITEM_FLAG_MUTATORBLOCKED;
+               }
+               if (autocvar_g_overkill_filter_armormedium)
+               {
+                       ITEM_ArmorMedium.spawnflags |= ITEM_FLAG_MUTATORBLOCKED;
+               }
+               if (autocvar_g_overkill_filter_armorbig)
+               {
+                       ITEM_ArmorBig.spawnflags |= ITEM_FLAG_MUTATORBLOCKED;
+               }
+               if (autocvar_g_overkill_filter_armormega)
+               {
+                       ITEM_ArmorMega.spawnflags |= ITEM_FLAG_MUTATORBLOCKED;
+               }
+               WEP_RPC.spawnflags &= ~WEP_FLAG_MUTATORBLOCKED;
+               WEP_HMG.spawnflags &= ~WEP_FLAG_MUTATORBLOCKED;
 -              WEP_SHOTGUN.mdl = "ok_shotgun";
 -              WEP_MACHINEGUN.mdl = "ok_mg";
 -              WEP_VORTEX.mdl = "ok_sniper";
++              //WEP_SHOTGUN.mdl = "ok_shotgun";
++              //WEP_MACHINEGUN.mdl = "ok_mg";
++              //WEP_VORTEX.mdl = "ok_sniper";
        }
  
        MUTATOR_ONREMOVE
@@@ -257,15 -304,3 +257,4 @@@ MUTATOR_HOOKFUNCTION(ok, SetModname
        M_ARGV(0, string) = "Overkill";
        return true;
  }
- void ok_Initialize()
- {
-       precache_all_playermodels("models/ok_player/*.dpm");
-       WEP_RPC.spawnflags &= ~WEP_FLAG_MUTATORBLOCKED;
-       WEP_HMG.spawnflags &= ~WEP_FLAG_MUTATORBLOCKED;
-       //WEP_SHOTGUN.mdl = "ok_shotgun";
-       //WEP_MACHINEGUN.mdl = "ok_mg";
-       //WEP_VORTEX.mdl = "ok_sniper";
- }
 +
Simple merge
@@@ -1,17 -1,16 +1,16 @@@
  #include "shotgun.qh"
  
  #ifdef SVQC
- spawnfunc(weapon_shotgun) { weapon_defaultspawnfunc(this, WEP_SHOTGUN); }
  
 -void W_Shotgun_Attack(Weapon thiswep, entity actor, .entity weaponentity, float isprimary)
 +void W_Shotgun_Attack(Weapon thiswep, entity actor, .entity weaponentity, float isprimary, float ammocount, float damage, float bullets, float spread, float solidpenetration, float force)
  {
 -      W_DecreaseAmmo(thiswep, actor, WEP_CVAR_PRI(shotgun, ammo), weaponentity);
 +      W_DecreaseAmmo(thiswep, actor, ammocount, weaponentity);
  
 -      W_SetupShot(actor, weaponentity, true, 5, SND_SHOTGUN_FIRE, ((isprimary) ? CH_WEAPON_A : CH_WEAPON_SINGLE), WEP_CVAR_PRI(shotgun, damage) * WEP_CVAR_PRI(shotgun, bullets));
 -      for(int sc = 0;sc < WEP_CVAR_PRI(shotgun, bullets);sc = sc + 1)
 -              fireBullet(actor, weaponentity, w_shotorg, w_shotdir, WEP_CVAR_PRI(shotgun, spread), WEP_CVAR_PRI(shotgun, solidpenetration), WEP_CVAR_PRI(shotgun, damage), WEP_CVAR_PRI(shotgun, force), WEP_SHOTGUN.m_id, 0);
 +      W_SetupShot(actor, weaponentity, true, 5, SND_SHOTGUN_FIRE, ((isprimary) ? CH_WEAPON_A : CH_WEAPON_SINGLE), damage * bullets);
 +      for(int sc = 0;sc < bullets;sc = sc + 1)
 +              fireBullet(actor, weaponentity, w_shotorg, w_shotdir, spread, solidpenetration, damage, force, WEP_SHOTGUN.m_id, 0);
  
 -      Send_Effect(EFFECT_SHOTGUN_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, WEP_CVAR_PRI(shotgun, ammo));
 +      Send_Effect(EFFECT_SHOTGUN_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, ammocount);
  
        // casing code
        if(autocvar_g_casings >= 1)
Simple merge
Simple merge