Merge branch 'master' into Mario/wepent_experimental
authorMario <mario@smbclan.net>
Sat, 31 Dec 2016 05:44:54 +0000 (15:44 +1000)
committerMario <mario@smbclan.net>
Sat, 31 Dec 2016 05:44:54 +0000 (15:44 +1000)
# Conflicts:
# qcsrc/common/mutators/mutator/overkill/sv_overkill.qc
# qcsrc/common/turrets/turret/plasma.qc
# qcsrc/common/turrets/turret/plasma_dual.qc
# qcsrc/common/weapons/weapon/vaporizer.qc
# qcsrc/common/weapons/weapon/vortex.qc

21 files changed:
1  2 
defaultXonotic.cfg
qcsrc/client/view.qc
qcsrc/common/mutators/mutator/breakablehook/sv_breakablehook.qc
qcsrc/common/mutators/mutator/buffs/sv_buffs.qc
qcsrc/common/mutators/mutator/nades/nades.qc
qcsrc/common/mutators/mutator/overkill/sv_overkill.qc
qcsrc/common/turrets/turret/plasma.qc
qcsrc/common/turrets/turret/plasma_dual.qc
qcsrc/common/vehicles/vehicle/bumblebee.qc
qcsrc/common/vehicles/vehicle/raptor.qc
qcsrc/common/vehicles/vehicle/spiderbot.qc
qcsrc/common/weapons/weapon.qh
qcsrc/common/weapons/weapon/vaporizer.qc
qcsrc/common/weapons/weapon/vortex.qc
qcsrc/server/g_damage.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/events.qh
qcsrc/server/player.qc
qcsrc/server/weapons/hitplot.qc
qcsrc/server/weapons/tracing.qc
qcsrc/server/weapons/tracing.qh

Simple merge
Simple merge
@@@ -34,7 -59,40 +34,7 @@@ void W_Blaster_Attack(entity, .entity, 
  spawnfunc(weapon_hmg);
  spawnfunc(weapon_rpc);
  
- MUTATOR_HOOKFUNCTION(ok, PlayerDamage_Calculate, CBC_ORDER_LAST)
 -void ok_DecreaseCharge(entity ent, int wep)
 -{
 -      if(!ent.ok_use_ammocharge) return;
 -
 -      entity wepent = Weapons_from(wep);
 -
 -      if (wepent == WEP_Null) return;  // dummy
 -
 -      ent.ammo_charge[wep] -= max(0, cvar(sprintf("g_overkill_ammo_decharge_%s", wepent.netname)));
 -}
 -
 -void ok_IncreaseCharge(entity ent, int wep)
 -{
 -      entity wepent = Weapons_from(wep);
 -
 -      if (wepent == WEP_Null) return;  // dummy
 -
 -      if(ent.ok_use_ammocharge)
 -      if(!PHYS_INPUT_BUTTON_ATCK(ent)) // not while attacking?
 -              ent.ammo_charge[wep] = min(autocvar_g_overkill_ammo_charge_limit, ent.ammo_charge[wep] + cvar(sprintf("g_overkill_ammo_charge_rate_%s", wepent.netname)) * frametime / W_TICSPERFRAME);
 -}
 -
 -float ok_CheckWeaponCharge(entity ent, int wep)
 -{
 -      if(!ent.ok_use_ammocharge) return true;
 -
 -      entity wepent = Weapons_from(wep);
 -
 -      if(wepent == WEP_Null) return false;  // dummy
 -
 -      return (ent.ammo_charge[wep] >= cvar(sprintf("g_overkill_ammo_decharge_%s", wepent.netname)));
 -}
 -
+ MUTATOR_HOOKFUNCTION(ok, Damage_Calculate, CBC_ORDER_LAST)
  {
        entity frag_attacker = M_ARGV(1, entity);
        entity frag_target = M_ARGV(2, entity);
@@@ -10,8 -10,7 +10,8 @@@ METHOD(PlasmaTurret, tr_attack, void(Pl
  {
      if(g_instagib)
      {
 -        FireRailgunBullet (it, it.tur_shotorg, it.tur_shotorg + it.tur_shotdir_updated * max_shot_distance, 10000000000,
 +        .entity weaponentity = weaponentities[0]; // TODO: unhardcode
-         FireRailgunBullet (it, weaponentity, it.tur_shotorg, it.tur_shotorg + it.tur_shotdir_updated * MAX_SHOT_DISTANCE, 10000000000,
++        FireRailgunBullet (it, weaponentity, it.tur_shotorg, it.tur_shotorg + it.tur_shotdir_updated * max_shot_distance, 10000000000,
                             800, 0, 0, 0, 0, DEATH_TURRET_PLASMA.m_id);
  
          Send_Effect(EFFECT_VORTEX_MUZZLEFLASH, it.tur_shotorg, it.tur_shotdir_updated * 1000, 1);
@@@ -9,8 -9,7 +9,8 @@@ spawnfunc(turret_plasma_dual) { if (!tu
  METHOD(DualPlasmaTurret, tr_attack, void(DualPlasmaTurret thistur, entity it))
  {
      if (g_instagib) {
 -        FireRailgunBullet (it, it.tur_shotorg, it.tur_shotorg + it.tur_shotdir_updated * max_shot_distance, 10000000000,
 +        .entity weaponentity = weaponentities[0]; // TODO: unhardcode
-         FireRailgunBullet (it, weaponentity, it.tur_shotorg, it.tur_shotorg + it.tur_shotdir_updated * MAX_SHOT_DISTANCE, 10000000000,
++        FireRailgunBullet (it, weaponentity, it.tur_shotorg, it.tur_shotorg + it.tur_shotdir_updated * max_shot_distance, 10000000000,
                             800, 0, 0, 0, 0, DEATH_TURRET_PLASMA.m_id);
  
  
@@@ -177,7 -175,7 +177,9 @@@ ENDCLASS(OffhandWeapon
  .OffhandWeapon offhand;
  #endif
  
- const int MAX_SHOT_DISTANCE = 32768;
++#ifdef GAMEQC
+ int max_shot_distance = 32768; // determined by world mins/maxs when map loads
++#endif
  
  // weapon flags
  const int WEP_TYPE_OTHER          =  0x00; // not for damaging people
@@@ -194,7 -193,7 +194,7 @@@ void W_Vaporizer_Attack(Weapon thiswep
  
        yoda = 0;
        damage_goodhits = 0;
-       FireRailgunBullet(actor, weaponentity, w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, vaporizer_damage, 800, 0, 0, 0, 0, WEP_VAPORIZER.m_id);
 -      FireRailgunBullet(actor, w_shotorg, w_shotorg + w_shotdir * max_shot_distance, vaporizer_damage, 800, 0, 0, 0, 0, WEP_VAPORIZER.m_id);
++      FireRailgunBullet(actor, weaponentity, w_shotorg, w_shotorg + w_shotdir * max_shot_distance, vaporizer_damage, 800, 0, 0, 0, 0, WEP_VAPORIZER.m_id);
  
        // do this now, as goodhits is disabled below
        SendCSQCVaporizerBeamParticle(actor, damage_goodhits);
@@@ -202,7 -193,7 +202,7 @@@ void W_Vortex_Attack(Weapon thiswep, en
  
        yoda = 0;
        damage_goodhits = 0;
-       FireRailgunBullet(actor, weaponentity, w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, mydmg, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, WEP_VORTEX.m_id);
 -      FireRailgunBullet(actor, w_shotorg, w_shotorg + w_shotdir * max_shot_distance, mydmg, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, WEP_VORTEX.m_id);
++      FireRailgunBullet(actor, weaponentity, w_shotorg, w_shotorg + w_shotdir * max_shot_distance, mydmg, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, WEP_VORTEX.m_id);
  
        if(yoda && flying)
                Send_Notification(NOTIF_ONE, actor, MSG_ANNCE, ANNCE_ACHIEVEMENT_YODA);
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge