]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into TimePath/global_self
authorTimePath <andrew.hardaker1995@gmail.com>
Wed, 2 Sep 2015 09:20:00 +0000 (19:20 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Wed, 2 Sep 2015 09:22:23 +0000 (19:22 +1000)
# Conflicts:
# qcsrc/server/mutators/gamemode_tdm.qc
# qcsrc/server/mutators/mutator_campcheck.qc
# qcsrc/server/mutators/mutator_instagib.qc
# qcsrc/server/mutators/mutator_multijump.qc
# qcsrc/server/mutators/mutator_nades.qc
# qcsrc/server/mutators/mutator_new_toys.qc
# qcsrc/server/mutators/mutator_spawn_near_teammate.qc
# qcsrc/server/t_items.qc

16 files changed:
1  2 
qcsrc/client/main.qc
qcsrc/server/cl_client.qc
qcsrc/server/mutators/gamemode_lms.qc
qcsrc/server/mutators/gamemode_tdm.qc
qcsrc/server/mutators/mutator_bloodloss.qc
qcsrc/server/mutators/mutator_campcheck.qc
qcsrc/server/mutators/mutator_instagib.qc
qcsrc/server/mutators/mutator_multijump.qc
qcsrc/server/mutators/mutator_nades.qc
qcsrc/server/mutators/mutator_new_toys.qc
qcsrc/server/mutators/mutator_physical_items.qc
qcsrc/server/mutators/mutator_spawn_near_teammate.qc
qcsrc/server/mutators/mutator_superspec.qc
qcsrc/server/spawnpoints.qc
qcsrc/server/t_items.qc
qcsrc/server/teamplay.qc

Simple merge
index 5ba3d866720a1e093e0ac26ce1ea2d3e5403019d,4d7b9fa0bf25a20d901ad6e231e525c070e74fbb..fda43661c3f97daca227bad8bbe61d902fbaa6d0
@@@ -2651,8 -2661,9 +2651,9 @@@ Called every frame for each client afte
  */
  .float idlekick_lasttimeleft;
  void PlayerPostThink (void)
 -{
 +{SELFPARAM();
        if(sv_maxidle > 0 && frametime) // WORKAROUND: only use dropclient in server frames (frametime set). Never use it in cl_movement frames (frametime zero).
+       if(IS_REAL_CLIENT(self))
        if(IS_PLAYER(self) || sv_maxidle_spectatorsareidle)
        {
                if (time - self.parm_idlesince < 1) // instead of (time == self.parm_idlesince) to support sv_maxidle <= 10
Simple merge
index 996857db5817087e4e3958271b05fc14b309f8a4,fda2161a6b99f48cefaf9e5d6de25af927a6ecdd..27cc19b0ab8d029f17092ac75a8ad1e903263a84
@@@ -9,8 -9,8 +9,8 @@@ Keys
  "netname" Name of the team (for example Red, Blue, Green, Yellow, Life, Death, Offense, Defense, etc)...
  "cnt" Scoreboard color of the team (for example 4 is red and 13 is blue)... */
  void spawnfunc_tdm_team()
 -{
 +{SELFPARAM();
-       if(!g_tdm) { remove(self); return; }
+       if(!g_tdm || !self.cnt) { remove(self); return; }
  
        self.classname = "tdm_team";
        self.team = self.cnt + 1;
index 960565d4253424bd0b60ece853bee36a3a67ecd3,2839ae09b6e546ee01faa1adf04be0ed0fc39e90..e4ad5ba19854f13851fb987bca87c111f189e1cf
@@@ -8,8 -8,8 +8,8 @@@
  .float campcheck_traveled_distance;
  
  MUTATOR_HOOKFUNCTION(campcheck_PlayerDies)
 -{
 +{SELFPARAM();
-       Kill_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER_CPID, CPID_CAMPCHECK);
+       Kill_Notification(NOTIF_ONE, self, MSG_CENTER_CPID, CPID_CAMPCHECK);
  
        return false;
  }
@@@ -28,10 -28,15 +28,15 @@@ MUTATOR_HOOKFUNCTION(campcheck_PlayerDa
  }
  
  MUTATOR_HOOKFUNCTION(campcheck_PlayerThink)
 -{
 +{SELFPARAM();
+       if(!gameover)
+       if(!warmup_stage) // don't consider it camping during warmup?
+       if(time >= game_starttime)
        if(IS_PLAYER(self))
+       if(IS_REAL_CLIENT(self)) // bots may camp, but that's no reason to constantly kill them
        if(self.deadflag == DEAD_NO)
        if(!self.frozen)
+       if(!self.BUTTON_CHAT)
        if(autocvar_g_campcheck_interval)
        {
                vector dist;
index 30810c82e4c7f84f6ec99de7df65f07b6afc8036,2e76d700e1c2b5c44a863490a8d848a6b37f0c7e..384c297808aa29ea61d34f8bd5ed0fd57bb06ea7
@@@ -335,10 -340,15 +340,13 @@@ MUTATOR_HOOKFUNCTION(instagib_FilterIte
  
        if(self.weapon == WEP_DEVASTATOR.m_id || self.weapon == WEP_VORTEX.m_id)
        {
 -              entity e = spawn(), oldself;
 +              entity e = spawn();
                setorigin(e, self.origin);
 -              oldself = self;
 -              self = e;
 -              self.noalign = oldself.noalign;
 -              self.cnt = oldself.cnt;
 -              self.team = oldself.team;
 -              spawnfunc_item_minst_cells();
 -              self = oldself;
++              e.noalign = self.noalign;
++        e.cnt = self.cnt;
++        e.team = self.team;
 +              SELFCALL(e, spawnfunc_item_minst_cells());
 +              SELFCALL_DONE();
                return true;
        }
  
index 265ebea424ac0d85c3ecc114f8728e55324bc799,a5bb70b8e2ed44b988fcf2d586841a3553db8dce..04e60bb83ec490cc6ebad1483a0642dfefff4fef
  .float stat_multijump;
  .float stat_multijump_speed;
  .float stat_multijump_add;
+ .float stat_multijump_maxspeed;
+ .float stat_multijump_dodging;
  
  void multijump_UpdateStats()
 -{
 +{SELFPARAM();
        self.stat_multijump = PHYS_MULTIJUMP;
        self.stat_multijump_speed = PHYS_MULTIJUMP_SPEED;
        self.stat_multijump_add = PHYS_MULTIJUMP_ADD;
@@@ -50,11 -61,20 +61,20 @@@ void PM_multijump(
        }
  }
  
float PM_multijump_checkjump()
bool PM_multijump_checkjump()
 -{
 +{SELFPARAM();
        if(!PHYS_MULTIJUMP) { return false; }
  
-       if (!IS_JUMP_HELD(self) && !IS_ONGROUND(self)) // jump button pressed this frame and we are in midair
+ #ifdef SVQC
+       bool client_multijump = self.cvar_cl_multijump;
+ #elif defined(CSQC)
+       bool client_multijump = cvar("cl_multijump");
+       if(cvar("cl_multijump") > 1)
+               return false; // nope
+ #endif
+       if (!IS_JUMP_HELD(self) && !IS_ONGROUND(self) && client_multijump) // jump button pressed this frame and we are in midair
                self.multijump_ready = true;  // this is necessary to check that we released the jump button and pressed it again
        else
                self.multijump_ready = false;
index fcab3c769739c773cf670293b199a86b4523abac,0adff6068c77770b6b754c1aa053ae194b51b2b3..8e49e2aa63404fe6c9505f84026935dd38e830af
@@@ -794,7 -794,11 +794,11 @@@ float nade_customize(
  }
  
  void nade_prime()
 -{
 +{SELFPARAM();
+       if(autocvar_g_nades_bonus_only)
+       if(!self.bonus_nades)
+               return; // only allow bonus nades
        if(self.nade)
                remove(self.nade);
  
index c80f19f6690118b5771a9e58f8a9168c70fe5f5e,1d4beda65d4dfa27efd1bed57031c84d7d0efa4c..172ee4d651430b2d8a6e08458f54cfb71a4f17f9
@@@ -188,8 -189,8 +189,8 @@@ MUTATOR_HOOKFUNCTION(nt_SetWeaponreplac
  }
  
  MUTATOR_HOOKFUNCTION(nt_FilterItem)
 -{
 +{SELFPARAM();
-       if(nt_IsNewToy(self.weapon))
+       if(nt_IsNewToy(self.weapon) && autocvar_g_new_toys_use_pickupsound)
                self.item_pickupsound = W_Sound("weaponpickup_new_toys");
        return 0;
  }
index 899438d762f911a0b547933085cd41f3b9e28fe7,1464870916ebaa23b06be4fe3992fb60a9b58ed0..e3178b338874f9892eb174afdffa6800e2c3c8a7
@@@ -7,9 -7,11 +7,11 @@@
  .float msnt_timer;
  .vector msnt_deathloc;
  
+ .float cvar_cl_spawn_near_teammate;
  MUTATOR_HOOKFUNCTION(msnt_Spawn_Score)
 -{
 +{SELFPARAM();
-       if(autocvar_g_spawn_near_teammate_ignore_spawnpoint)
+       if(autocvar_g_spawn_near_teammate_ignore_spawnpoint == 1 || (autocvar_g_spawn_near_teammate_ignore_spawnpoint == 2 && self.cvar_cl_spawn_near_teammate))
                return 0;
  
        entity p;
@@@ -44,9 -46,9 +46,9 @@@
  }
  
  MUTATOR_HOOKFUNCTION(msnt_PlayerSpawn)
 -{
 +{SELFPARAM();
        // Note: when entering this, fixangle is already set.
-       if(autocvar_g_spawn_near_teammate_ignore_spawnpoint)
+       if(autocvar_g_spawn_near_teammate_ignore_spawnpoint == 1 || (autocvar_g_spawn_near_teammate_ignore_spawnpoint == 2 && self.cvar_cl_spawn_near_teammate))
        {
                if(autocvar_g_spawn_near_teammate_ignore_spawnpoint_delay_death)
                        self.msnt_timer = time + autocvar_g_spawn_near_teammate_ignore_spawnpoint_delay_death;
Simple merge
index 47165c7732921b1f2c1b21da16658c2c9d7dc352,5d392fd84a24c8fc64a025fc4d2f1ae0aa2c2f4e..671f1d0eda5cc63d49f9e380ddab6cd56ddf3310
@@@ -75,8 -75,28 +75,28 @@@ void ItemDrawSimple(
      }
  }
  
+ void Item_PreDraw()
+ {
+       vector org;
+       float alph;
+       org = getpropertyvec(VF_ORIGIN);
+       if(!checkpvs(org, self)) // this makes sense as long as we don't support recursive warpzones
+               alph = 0;
+       else if(self.fade_start)
+               alph = bound(0, (self.fade_end - vlen(org - self.origin - 0.5 * (self.mins + self.maxs))) / (self.fade_end - self.fade_start), 1);
+       else
+               alph = 1;
+       //printf("%v <-> %v\n", view_origin, self.origin + 0.5 * (self.mins + self.maxs));
+       if(self.ItemStatus & ITS_AVAILABLE)
+               self.alpha = alph;
+       if(alph <= 0)
+               self.drawmask = 0;
+       else
+               self.drawmask = MASK_NORMAL;
+ }
  void ItemRead(float _IsNew)
 -{
 +{SELFPARAM();
      int sf = ReadByte();
  
      if(sf & ISF_LOCATION)
  
  #ifdef SVQC
  bool ItemSend(entity to, int sf)
 -{
 +{SELFPARAM();
-     if(self.gravity)
-         sf |= ISF_DROP;
-     else
-         sf &= ~ISF_DROP;
+       if(self.gravity)
+               sf |= ISF_DROP;
+       else
+               sf &= ~ISF_DROP;
  
        WriteByte(MSG_ENTITY, ENT_CLIENT_ITEM);
        WriteByte(MSG_ENTITY, sf);
@@@ -805,7 -833,8 +832,8 @@@ void Item_FindTeam(
  // Savage: used for item garbage-collection
  // TODO: perhaps nice special effect?
  void RemoveItem(void)
 -{
 +{SELFPARAM();
+       if(wasfreed(self) || !self) { return; }
        Send_Effect(EFFECT_ITEM_PICKUP, CENTER_OR_VIEWOFS(self), '0 0 0', 1);
        remove(self);
  }
Simple merge