]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into Lyberta/StandaloneOverkillWeapons
authorLyberta <lyberta@lyberta.net>
Fri, 17 Mar 2017 20:13:19 +0000 (23:13 +0300)
committerLyberta <lyberta@lyberta.net>
Fri, 17 Mar 2017 20:13:19 +0000 (23:13 +0300)
1  2 
bal-wep-overkill.cfg
qcsrc/common/mutators/mutator/overkill/sv_overkill.qc
qcsrc/common/stats.qh
qcsrc/server/client.qc

diff --combined bal-wep-overkill.cfg
index a7b30e4d24b3c5f077834b4a70341445704c5cce,f423417f83b854c752b8640871580c9142886b78..5949be955693adb5f0984e299c6b648e3af42b30
@@@ -81,7 -81,7 +81,7 @@@ set g_balance_machinegun_first_spread 0
  set g_balance_machinegun_mode 1
  set g_balance_machinegun_reload_ammo 30
  set g_balance_machinegun_reload_time 1.5
- set g_balance_machinegun_solidpenetration 13.1
+ set g_balance_machinegun_solidpenetration 63
  set g_balance_machinegun_spread_add 0.012
  set g_balance_machinegun_spread_max 0.05
  set g_balance_machinegun_spread_min 0
@@@ -818,129 -818,3 +818,129 @@@ set g_balance_rpc_weaponstart 
  set g_balance_rpc_weaponstartoverride 0
  set g_balance_rpc_weaponthrowable 0
  // }}}
 +// {{{ Overkill Shotgun
 +set g_balance_okshotgun_primary_ammo 6.25
 +set g_balance_okshotgun_primary_animtime 0.65
 +set g_balance_okshotgun_primary_bot_range 512
 +set g_balance_okshotgun_primary_bullets 10
 +set g_balance_okshotgun_primary_damage 17
 +set g_balance_okshotgun_primary_force 80
 +set g_balance_okshotgun_primary_refire 0.75
 +set g_balance_okshotgun_primary_solidpenetration 3.8
 +set g_balance_okshotgun_primary_spread 0.07
 +set g_balance_okshotgun_reload_ammo 50
 +set g_balance_okshotgun_reload_time 2
 +set g_balance_okshotgun_secondary_ammo 0
 +set g_balance_okshotgun_secondary_animtime 0.2
 +set g_balance_okshotgun_secondary_damage 25
 +set g_balance_okshotgun_secondary_delay 0
 +set g_balance_okshotgun_secondary_edgedamage 12.5
 +set g_balance_okshotgun_secondary_force 300
 +set g_balance_okshotgun_secondary_lifetime 5
 +set g_balance_okshotgun_secondary_radius 70
 +set g_balance_okshotgun_secondary_refire 0.7
 +set g_balance_okshotgun_secondary_shotangle 0
 +set g_balance_okshotgun_secondary_speed 6000
 +set g_balance_okshotgun_secondary_spread 0
 +set g_balance_okshotgun_switchdelay_drop 0.2
 +set g_balance_okshotgun_switchdelay_raise 0.2
 +set g_balance_okshotgun_weaponreplace ""
 +set g_balance_okshotgun_weaponstart 0
 +set g_balance_okshotgun_weaponstartoverride -1
 +set g_balance_okshotgun_weaponthrowable 1
 +// }}}
 +// {{{ Overkill Machine Gun
 +set g_balance_okmachinegun_burst 3
 +set g_balance_okmachinegun_burst_ammo 3
 +set g_balance_okmachinegun_burst_animtime 0.3
 +set g_balance_okmachinegun_burst_refire 0.06
 +set g_balance_okmachinegun_burst_refire2 0.45
 +set g_balance_okmachinegun_burst_speed 0
 +set g_balance_okmachinegun_first 1
 +set g_balance_okmachinegun_first_ammo 1
 +set g_balance_okmachinegun_first_damage 14
 +set g_balance_okmachinegun_first_force 5
 +set g_balance_okmachinegun_first_refire 0.125
 +set g_balance_okmachinegun_first_spread 0.03
 +set g_balance_okmachinegun_mode 1
 +set g_balance_okmachinegun_reload_ammo 30
 +set g_balance_okmachinegun_reload_time 1.5
 +set g_balance_okmachinegun_secondary_ammo 0
 +set g_balance_okmachinegun_secondary_animtime 0.2
 +set g_balance_okmachinegun_secondary_damage 25
 +set g_balance_okmachinegun_secondary_delay 0
 +set g_balance_okmachinegun_secondary_edgedamage 12.5
 +set g_balance_okmachinegun_secondary_force 300
 +set g_balance_okmachinegun_secondary_lifetime 5
 +set g_balance_okmachinegun_secondary_radius 70
 +set g_balance_okmachinegun_secondary_refire 0.7
 +set g_balance_okmachinegun_secondary_shotangle 0
 +set g_balance_okmachinegun_secondary_speed 6000
 +set g_balance_okmachinegun_secondary_spread 0
 +set g_balance_okmachinegun_solidpenetration 13.1
 +set g_balance_okmachinegun_spread_add 0.012
 +set g_balance_okmachinegun_spread_max 0.05
 +set g_balance_okmachinegun_spread_min 0
 +set g_balance_okmachinegun_sustained_ammo 1
 +set g_balance_okmachinegun_sustained_damage 25
 +set g_balance_okmachinegun_sustained_force 5
 +set g_balance_okmachinegun_sustained_refire 0.1
 +set g_balance_okmachinegun_sustained_spread 0.01
 +set g_balance_okmachinegun_switchdelay_drop 0.2
 +set g_balance_okmachinegun_switchdelay_raise 0.2
 +set g_balance_okmachinegun_weaponreplace ""
 +set g_balance_okmachinegun_weaponstart 0
 +set g_balance_okmachinegun_weaponstartoverride -1
 +set g_balance_okmachinegun_weaponthrowable 1
 +// }}}
 +// {{{ Overkill Vortex
 +set g_balance_okvortex_charge 0
 +set g_balance_okvortex_charge_animlimit 0.5
 +set g_balance_okvortex_charge_limit 1
 +set g_balance_okvortex_charge_maxspeed 800
 +set g_balance_okvortex_charge_mindmg 40
 +set g_balance_okvortex_charge_minspeed 400
 +set g_balance_okvortex_charge_rate 0.6
 +set g_balance_okvortex_charge_rot_pause 0
 +set g_balance_okvortex_charge_rot_rate 0
 +set g_balance_okvortex_charge_shot_multiplier 0
 +set g_balance_okvortex_charge_start 0.5
 +set g_balance_okvortex_charge_velocity_rate 0
 +set g_balance_okvortex_primary_ammo 10
 +set g_balance_okvortex_primary_animtime 0.65
 +set g_balance_okvortex_primary_damage 100
 +set g_balance_okvortex_primary_damagefalloff_forcehalflife 0
 +set g_balance_okvortex_primary_damagefalloff_halflife 0
 +set g_balance_okvortex_primary_damagefalloff_maxdist 0
 +set g_balance_okvortex_primary_damagefalloff_mindist 0
 +set g_balance_okvortex_primary_force 500
 +set g_balance_okvortex_primary_refire 1
 +set g_balance_okvortex_reload_ammo 50
 +set g_balance_okvortex_reload_time 2
 +set g_balance_okvortex_secondary 2
 +set g_balance_okvortex_secondary_ammo 0
 +set g_balance_okvortex_secondary_animtime 0.2
 +set g_balance_okvortex_secondary_chargepool 0
 +set g_balance_okvortex_secondary_chargepool_pause_regen 1
 +set g_balance_okvortex_secondary_chargepool_regen 0.15
 +set g_balance_okvortex_secondary_damage 25
 +set g_balance_okvortex_secondary_damagefalloff_forcehalflife 0
 +set g_balance_okvortex_secondary_damagefalloff_halflife 0
 +set g_balance_okvortex_secondary_damagefalloff_maxdist 0
 +set g_balance_okvortex_secondary_damagefalloff_mindist 0
 +set g_balance_okvortex_secondary_force 300
 +set g_balance_okvortex_secondary_refire 0.7
 +set g_balance_okvortex_secondary_delay 0
 +set g_balance_okvortex_secondary_edgedamage 12.5
 +set g_balance_okvortex_secondary_lifetime 5
 +set g_balance_okvortex_secondary_radius 70
 +set g_balance_okvortex_secondary_shotangle 0
 +set g_balance_okvortex_secondary_speed 6000
 +set g_balance_okvortex_secondary_spread 0
 +set g_balance_okvortex_switchdelay_drop 0.2
 +set g_balance_okvortex_switchdelay_raise 0.2
 +set g_balance_okvortex_weaponreplace ""
 +set g_balance_okvortex_weaponstart 0
 +set g_balance_okvortex_weaponstartoverride -1
 +set g_balance_okvortex_weaponthrowable 1
 +// }}}
index b36bae733476dea98ceffa773c9a9980283858a7,82df487c5cc33253e20c69e6b0a4dff91ac5b3dc..1a6faa16fa5209a5eacd8f327a9cbcfb83f24c22
@@@ -5,6 -5,8 +5,8 @@@
  
  bool autocvar_g_overkill_powerups_replace;
  
+ bool autocvar_g_overkill_itemwaypoints = true;
  bool autocvar_g_overkill_filter_healthmega;
  bool autocvar_g_overkill_filter_armormedium;
  bool autocvar_g_overkill_filter_armorbig;
@@@ -223,6 -225,34 +225,34 @@@ MUTATOR_HOOKFUNCTION(ok, OnEntityPreSpa
        }
  }
  
+ bool ok_HandleItemWaypoints(entity e)
+ {
+       if(!autocvar_g_overkill_itemwaypoints)
+               return false; // don't handle it
+       switch(e.itemdef)
+       {
+               case ITEM_HealthMega: return true;
+               case ITEM_ArmorMedium: return true;
+               case ITEM_ArmorBig: return true;
+               case ITEM_ArmorMega: return true;
+       }
+       return false;
+ }
+ MUTATOR_HOOKFUNCTION(ok, Item_RespawnCountdown)
+ {
+       entity item = M_ARGV(0, entity);
+       return ok_HandleItemWaypoints(item);
+ }
+ MUTATOR_HOOKFUNCTION(ok, Item_ScheduleRespawn)
+ {
+       entity item = M_ARGV(0, entity);
+       return ok_HandleItemWaypoints(item);
+ }
  MUTATOR_HOOKFUNCTION(ok, FilterItem)
  {
        entity item = M_ARGV(0, entity);
  
  MUTATOR_HOOKFUNCTION(ok, SetStartItems, CBC_ORDER_LAST)
  {
 -      WepSet ok_start_items = (WEPSET(MACHINEGUN) | WEPSET(VORTEX) | WEPSET(SHOTGUN));
 +      WepSet ok_start_items = (WEPSET(OVERKILL_MACHINEGUN) | WEPSET(OVERKILL_VORTEX) | WEPSET(OVERKILL_SHOTGUN));
  
        if(WEP_RPC.weaponstart > 0) { ok_start_items |= WEPSET(RPC); }
        if(WEP_HMG.weaponstart > 0) { ok_start_items |= WEPSET(HMG); }
@@@ -292,7 -322,7 +322,7 @@@ void ok_Initialize(
        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";
  }
diff --combined qcsrc/common/stats.qh
index 095635dda7846b3dc947d2f34bb1bbe7815edf66,cde626a2a203ba5b30b8dd94eb18ab939b188303..bea426a3412513f65256ab8a8ef73cfbf0feebc8
@@@ -78,11 -78,9 +78,11 @@@ REGISTER_STAT(WEAPON_CLIPLOAD, int
  REGISTER_STAT(WEAPON_CLIPSIZE, int)
  
  REGISTER_STAT(VORTEX_CHARGE, float)
 +REGISTER_STAT(OVERKILL_VORTEX_CHARGE, float)
  REGISTER_STAT(LAST_PICKUP, float)
  REGISTER_STAT(HUD, int)
  REGISTER_STAT(VORTEX_CHARGEPOOL, float)
 +REGISTER_STAT(OVERKILL_VORTEX_CHARGEPOOL, float)
  REGISTER_STAT(HIT_TIME, float)
  REGISTER_STAT(DAMAGE_DEALT_TOTAL, int)
  REGISTER_STAT(TYPEHIT_TIME, float)
@@@ -246,7 -244,7 +246,7 @@@ REGISTER_STAT(JETPACK_MAXSPEED_SIDE, fl
  REGISTER_STAT(JETPACK_MAXSPEED_UP, float, autocvar_g_jetpack_maxspeed_up)
  REGISTER_STAT(JETPACK_REVERSE_THRUST, float, autocvar_g_jetpack_reverse_thrust)
  
- REGISTER_STAT(MOVEVARS_HIGHSPEED, float, autocvar_g_movement_highspeed)
+ REGISTER_STAT(MOVEVARS_HIGHSPEED, float)
  
  #ifdef SVQC
  AUTOCVAR(g_walljump, bool, false, "Enable wall jumping mutator");
diff --combined qcsrc/server/client.qc
index 51f0a39530647c4ccf27212ea6fd56faf0de79b5,9d5be4c80f3cb432d32fd3939aedd59327bbb6e8..eeded4b25343337a526a6e05584d08bdb250324c
@@@ -56,8 -56,6 +56,8 @@@
  
  #include "../lib/warpzone/server.qh"
  
 +#include <common/mutators/mutator/overkill/okvortex.qh>
 +
  STATIC_METHOD(Client, Add, void(Client this, int _team))
  {
      ClientConnect(this);
@@@ -1233,6 -1231,8 +1233,8 @@@ void ClientConnect(entity this
                sv_notice_join(this);
  
        // update physics stats (players can spawn before physics runs)
+       STAT(MOVEVARS_HIGHSPEED, this) = autocvar_g_movement_highspeed;
+       MUTATOR_CALLHOOK(PlayerPhysics_UpdateStats, this); // do it BEFORE the function so we can modify highspeed!
        Physics_UpdateStats(this, PHYS_HIGHSPEED(this));
  
        IL_EACH(g_initforplayer, it.init_for_player, {
@@@ -1696,8 -1696,6 +1698,8 @@@ void SpectateCopy(entity this, entity s
        this.weapons = spectatee.weapons;
        this.vortex_charge = spectatee.vortex_charge;
        this.vortex_chargepool_ammo = spectatee.vortex_chargepool_ammo;
 +      this.okvortex_charge = spectatee.okvortex_charge;
 +      this.okvortex_chargepool_ammo = spectatee.okvortex_chargepool_ammo;
        this.hagar_load = spectatee.hagar_load;
        this.arc_heat_percent = spectatee.arc_heat_percent;
        this.minelayer_mines = spectatee.minelayer_mines;
@@@ -2516,13 -2514,7 +2518,13 @@@ void PlayerPreThink (entity this
                {
                        .entity weaponentity = weaponentities[slot];
                        if (WEP_CVAR(vortex, charge_rot_rate) && this.(weaponentity).vortex_charge > WEP_CVAR(vortex, charge_limit) && this.(weaponentity).vortex_charge_rottime < time)
 +                      {
                                this.(weaponentity).vortex_charge = bound(WEP_CVAR(vortex, charge_limit), this.(weaponentity).vortex_charge - WEP_CVAR(vortex, charge_rot_rate) * frametime / W_TICSPERFRAME, 1);
 +                      }
 +                      if (WEP_CVAR(okvortex, charge_rot_rate) && this.(weaponentity).okvortex_charge > WEP_CVAR(okvortex, charge_limit) && this.(weaponentity).okvortex_charge_rottime < time)
 +                      {
 +                              this.(weaponentity).okvortex_charge = bound(WEP_CVAR(okvortex, charge_limit), this.(weaponentity).okvortex_charge - WEP_CVAR(okvortex, charge_rot_rate) * frametime / W_TICSPERFRAME, 1);
 +                      }
                }
  
                if (frametime) player_anim(this);