]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into Mario/wepent_experimental
authorMario <mario@smbclan.net>
Fri, 21 Oct 2016 01:27:13 +0000 (11:27 +1000)
committerMario <mario@smbclan.net>
Fri, 21 Oct 2016 01:27:13 +0000 (11:27 +1000)
# Conflicts:
# qcsrc/common/weapons/weapon/hagar.qc
# qcsrc/common/weapons/weapon/tuba.qc

16 files changed:
1  2 
qcsrc/common/monsters/monster.qh
qcsrc/common/monsters/monster/mage.qc
qcsrc/common/monsters/monster/shambler.qc
qcsrc/common/monsters/monster/spider.qc
qcsrc/common/monsters/monster/wyvern.qc
qcsrc/common/monsters/monster/zombie.qc
qcsrc/common/monsters/sv_monsters.qc
qcsrc/common/mutators/mutator/nades/nades.qc
qcsrc/common/weapons/weapon/arc.qc
qcsrc/common/weapons/weapon/hagar.qc
qcsrc/common/weapons/weapon/seeker.qc
qcsrc/common/weapons/weapon/tuba.qc
qcsrc/server/bot/default/scripting.qc
qcsrc/server/client.qc
qcsrc/server/defs.qh
qcsrc/server/g_damage.qc

index 8540d5cc2a4be8f564d4a17301eeec5a8cf58ace,2685e2fbced75be78c0402980f5a5acea84f9294..5572fe9102d05a1a07174cfc5255a143784e30ce
@@@ -1,19 -1,20 +1,20 @@@
  #pragma once
  
  // special spawn flags
- const int MONSTER_RESPAWN_DEATHPOINT = 16; // re-spawn where we died
- const int MONSTER_TYPE_FLY = 32;
- const int MONSTER_TYPE_SWIM = 64;
- const int MONSTER_SIZE_BROKEN = 128; // TODO: remove when bad models are replaced
- const int MON_FLAG_SUPERMONSTER = 256; // incredibly powerful monster
- const int MON_FLAG_RANGED = 512; // monster shoots projectiles
- const int MON_FLAG_MELEE = 1024;
- const int MON_FLAG_CRUSH = 2048; // monster can be stomped in special modes
- const int MON_FLAG_RIDE = 4096; // monster can be ridden in special modes
- const int MONSTER_SIZE_QUAKE = 8192;
+ const int MONSTER_RESPAWN_DEATHPOINT = BIT(4); // re-spawn where we died
+ const int MONSTER_TYPE_FLY = BIT(5);
+ const int MONSTER_TYPE_SWIM = BIT(6);
+ const int MONSTER_SIZE_BROKEN = BIT(7); // TODO: remove when bad models are replaced
+ const int MON_FLAG_SUPERMONSTER = BIT(8); // incredibly powerful monster
+ const int MON_FLAG_RANGED = BIT(9); // monster shoots projectiles
+ const int MON_FLAG_MELEE = BIT(10);
+ const int MON_FLAG_CRUSH = BIT(11); // monster can be stomped in special modes
+ const int MON_FLAG_RIDE = BIT(12); // monster can be ridden in special modes
+ const int MONSTER_SIZE_QUAKE = BIT(13);
+ const int MONSTER_TYPE_PASSIVE = BIT(14); // doesn't target or chase enemies
  
  // entity properties of monsterinfo:
 -.bool(int, entity actor, entity targ) monster_attackfunc;
 +.bool(int, entity actor, entity targ, .entity weaponentity) monster_attackfunc;
  
  // animations
  .vector anim_blockend;
Simple merge
Simple merge
index 3d011345b10c74fb3c01f58b27de545329660816,57697635791cd7b229ba5bf6639717a61a21c3c1..89a87433bd2bdf0bb8cce7a35150fa491ab4ec89
@@@ -341,6 -340,8 +341,8 @@@ void W_Arc_Beam_Think(entity this
                ||
                forbidWeaponUse(this.owner)
                ||
 -              PS(this.owner).m_switchweapon != WEP_ARC
++              this.owner.(weaponentity).m_switchweapon != WEP_ARC
+               ||
                (!PHYS_INPUT_BUTTON_ATCK(this.owner) && !burst )
                ||
                this.owner.vehicle
index cb4d365ad1a7c633ff4db54e92e1020baf89783d,097f2bfdcccdc06fb4df27b6e486d47260a77ab9..96479d1abed52fc59fa1a9d2f94f8d9c7dbfd2ed
@@@ -313,10 -310,10 +313,10 @@@ void W_Hagar_Attack2_Load(Weapon thiswe
  {
        // loadable hagar secondary attack, must always run each frame
  
-       if(time < game_starttime)
+       if(time < game_starttime || PS(actor).m_switchweapon != WEP_HAGAR)
                return;
  
 -      bool loaded = actor.hagar_load >= WEP_CVAR_SEC(hagar, load_max);
 +      bool loaded = actor.(weaponentity).hagar_load >= WEP_CVAR_SEC(hagar, load_max);
  
        // this is different than WR_CHECKAMMO when it comes to reloading
        bool enough_ammo;
  
  void W_Hagar_Attack_Auto(Weapon thiswep, entity actor, .entity weaponentity, int fire)
  {
-       if(!(fire & 1) || actor.(weaponentity).hagar_load || actor.(weaponentity).hagar_loadblock)
 -      if(!(fire & 1) || actor.hagar_load || actor.hagar_loadblock || PS(actor).m_switchweapon != WEP_HAGAR)
++      if(!(fire & 1) || actor.(weaponentity).hagar_load || actor.(weaponentity).hagar_loadblock || actor.(weaponentity).m_switchweapon != WEP_HAGAR)
        {
                w_ready(thiswep, actor, weaponentity, fire);
                return;
Simple merge
index 1c6948c390f53dc36eb55ca3ea3c37c5887cbb6b,7f1bce0ace2741c05340c025a1f49524ce4969e1..d68de4a353cc8d24c0a95508e6a14bc6fa80676c
@@@ -398,19 -396,40 +398,11 @@@ METHOD(Tuba, wr_think, void(Tuba this, 
        }
  }
  
 -METHOD(Tuba, wr_setup, void(Tuba this, entity actor))
 +METHOD(Tuba, wr_setup, void(Tuba this, entity actor, .entity weaponentity))
  {
 -      actor.ammo_field = ammo_none;
 -      actor.tuba_instrument = 0;
 +      actor.(weaponentity).tuba_instrument = 0;
  }
 -#endif
  
 -REGISTER_NET_S2C(tuba_instrument)
 -#ifdef CSQC
 -NET_HANDLE(tuba_instrument, bool)
 -{
 -      int i = ReadByte();
 -      return = true;
 -      string s = (i == 0) ? "tuba" :
 -                 (i == 1) ? "akordeon" :
 -                            "kleinbottle" ;
 -      CL_WeaponEntity_SetModel(viewmodel, s, true);
 -}
 -#endif
 -#ifdef SVQC
 -void tuba_instrument_send(entity this, int instr)
 -{
 -      msg_entity = this;
 -      if (!IS_REAL_CLIENT(this))
 -              return;
 -      int chan = MSG_ONE;
 -      WriteHeader(chan, tuba_instrument);
 -      WriteByte(chan, instr);
 -}
--SPECTATE_COPY()
--{
-       for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
-       {
-               .entity weaponentity = weaponentities[slot];
-               this.(weaponentity).tuba_instrument = spectatee.(weaponentity).tuba_instrument;
-       }
 -      if (this.tuba_instrument != spectatee.tuba_instrument)
 -              tuba_instrument_send(this, this.tuba_instrument = spectatee.tuba_instrument);
--}
  METHOD(Tuba, wr_reload, void(Tuba this, entity actor, .entity weaponentity))
  {
        // switch to alternate instruments :)
Simple merge
Simple merge
Simple merge
Simple merge