]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into mario/mutator_minstagib
authorMario <mario.mario@y7mail.com>
Thu, 7 Mar 2013 06:22:48 +0000 (17:22 +1100)
committerMario <mario.mario@y7mail.com>
Thu, 7 Mar 2013 06:22:48 +0000 (17:22 +1100)
14 files changed:
1  2 
qcsrc/server/cl_client.qc
qcsrc/server/cl_physics.qc
qcsrc/server/cl_player.qc
qcsrc/server/cl_weaponsystem.qc
qcsrc/server/g_damage.qc
qcsrc/server/g_world.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/mutators.qh
qcsrc/server/progs.src
qcsrc/server/t_items.qc
qcsrc/server/teamplay.qc
qcsrc/server/w_common.qc
qcsrc/server/w_laser.qc
qcsrc/server/w_minstanex.qc

index 19588c0b34d603e9539d536e9fc48abb73d7521d,356d444c0c8a46918d573da4b036756243c6b1ef..a2ee7ece342a143758f54fb732510cb8b203943e
@@@ -404,11 -404,14 +404,12 @@@ void PutObserverInServer (void
        DropAllRunes(self);
        MUTATOR_CALLHOOK(MakePlayerObserver);
  
 -      minstagib_stop_countdown(self);
 -
        Portal_ClearAll(self);
+       
        if(self.alivetime)
        {
-               PlayerStats_Event(self, PLAYERSTATS_ALIVETIME, time - self.alivetime);
+               if(!inWarmupStage)
+                       PlayerStats_Event(self, PLAYERSTATS_ALIVETIME, time - self.alivetime);
                self.alivetime = 0;
        }
  
Simple merge
Simple merge
Simple merge
index f014ed3d5aecc9f61436c77da4d85b31e61b5715,e86b148bcb0b170851e4ac934ba1917d6a3353c3..859e52ae0a1614cc941455d77eefc4f9122efb27
@@@ -618,12 -661,17 +661,12 @@@ void Damage (entity targ, entity inflic
                                        {
                                                if(targ.classname == "player" && targ.deadflag == DEAD_NO)
                                                {
-                                                       teamdamage0 = max(attacker.dmg_team, autocvar_g_teamdamage_threshold);
                                                        attacker.dmg_team = attacker.dmg_team + damage;
-                                                       if(attacker.dmg_team > teamdamage0 && !g_ca)
-                                                               mirrordamage = autocvar_g_mirrordamage * (attacker.dmg_team - teamdamage0);
+                                                       complainteamdamage = attacker.dmg_team - autocvar_g_teamdamage_threshold;
+                                                       if(complainteamdamage > 0 && !g_ca) // FIXME why is g_ca ruled out here? Why not just g_mirrordamage 0 on CA servers?
+                                                               mirrordamage = autocvar_g_mirrordamage * complainteamdamage;
                                                        mirrorforce = autocvar_g_mirrordamage * vlen(force);
 -                                                      if(g_minstagib)
 -                                                      {
 -                                                              if(autocvar_g_friendlyfire == 0)
 -                                                                      damage = 0;
 -                                                      }
 -                                                      else if(g_ca)
 +                                                      if(g_ca)
                                                                damage = 0;
                                                        else
                                                                damage = autocvar_g_friendlyfire * damage;
                                                        if(IsFlying(victim))
                                                                yoda = 1;
  
++<<<<<<< HEAD
 +                                                      if(deathtype & HITTYPE_HEADSHOT)
 +                                                              headshot = 1;
++=======
+                                                       if(g_minstagib)
+                                                       if(victim.items & IT_STRENGTH)
+                                                               yoda = 1;
++>>>>>>> master
                                                }
                                        }
                                }
index 313814c3e29e86d5b30183b3467a94f1321a29c5,894ffd6158b7b347a5ed283d6f334ee3aef57988..3762e003ed2ce5c80fd9a45150bd630a5516012c
@@@ -932,11 -939,12 +932,9 @@@ void spawnfunc_worldspawn (void
                modname = cvar_string("g_mod_balance");
        if(cvar_string("g_mod_config") != cvar_defstring("g_mod_config"))
                modname = cvar_string("g_mod_config");
 -      // weird mutators that deserve to count as mod
 -      if(autocvar_g_minstagib)
 -              modname = "MinstaGib";
        // extra mutators that deserve to count as mod
        MUTATOR_CALLHOOK(SetModname);
-       // weird game types that deserve to count as mod
-       if(g_cts)
-               modname = "CTS";
        // save it for later
        modname = strzone(modname);
  
Simple merge
Simple merge
Simple merge
index 3a0c0d12e3a4920938d1c3c495715fa7c6293bfb,2ff925ca53d9fbf2ac2c05c103b85e4a0402e263..9e66df92be7ced5428d9bfe58c0ec029125acfa8
@@@ -600,7 -614,72 +600,7 @@@ float Item_GiveTo(entity item, entity p
        // if nothing happens to player, just return without taking the item
        pickedup = FALSE;
        _switchweapon = FALSE;
-       
 -      if (g_minstagib)
 -      {
 -              float prevcells = player.ammo_cells;
 -
 -              pickedup |= Item_GiveAmmoTo(item, player, ammo_fuel, g_pickup_fuel_max, ITEM_MODE_FUEL);
 -              pickedup |= Item_GiveAmmoTo(item, player, ammo_cells, 999, ITEM_MODE_NONE);
 -
 -              if(player.ammo_cells > prevcells)
 -              {
 -                      _switchweapon = TRUE;
 -
 -                      // play some cool sounds ;)
 -                      if (clienttype(player) == CLIENTTYPE_REAL)
 -                      {
 -                              if(player.health <= 5)
 -                                      AnnounceTo(player, "lastsecond");
 -                              else if(player.health < 50)
 -                                      AnnounceTo(player, "narrowly");
 -                      }
 -                      // sound not available
 -                      // else if(item.items == IT_CELLS)
 -                      //      AnnounceTo(player, "ammo");
 -
 -                      if (WEPSET_CONTAINS_EW(item, WEP_MINSTANEX))
 -                              W_GiveWeapon (player, WEP_MINSTANEX);
 -                      player.health = 100;
 -              }
 -
 -              if((it = (item.items - (item.items & player.items)) & IT_PICKUPMASK))
 -              {
 -                      pickedup = TRUE;
 -                      player.items |= it;
 -                      sprint (player, strcat("You got the ^2", item.netname, "\n"));
 -              }
 -
 -              // extralife powerup
 -              if (item.max_health)
 -              {
 -                      pickedup = TRUE;
 -                      // sound not available
 -                      // AnnounceTo(player, "_lives");
 -                      player.armorvalue = bound(player.armorvalue, 999, player.armorvalue + autocvar_g_minstagib_extralives);
 -                      sprint(player, "^3You picked up some extra lives\n");
 -              }
 -
 -              // invis powerup
 -              if (item.strength_finished)
 -              {
 -                      pickedup = TRUE;
 -                      // sound not available
 -                      // AnnounceTo(player, "invisible");
 -                      player.strength_finished = max(player.strength_finished, time) + autocvar_g_balance_powerup_strength_time;
 -              }
 -
 -              // speed powerup
 -              if (item.invincible_finished)
 -              {
 -                      pickedup = TRUE;
 -                      // sound not available
 -                      // AnnounceTo(player, "speed");
 -                      player.invincible_finished = max(player.invincible_finished, time) + autocvar_g_balance_powerup_invincible_time;
 -              }
 -      }
 -      else
 -      {
                // in case the player has autoswitch enabled do the following:
                // if the player is using their best weapon before items are given, they
                // probably want to switch to an even better weapon after items are given
Simple merge
index 9bae1b7ba720b3c476ead7f9980627fba21bfea6,e68a417e00de6855f4bbfce117ce244b4de3a5f1..d755f68dfc7dbb182b52f7e8c970b3e84eb896f4
@@@ -11,12 -11,9 +11,8 @@@ void W_GiveWeapon (entity e, float wep
        oldself = self;
        self = e;
  
-       if (other.classname == "player")
-       {
-               sprint (other, "You got the ^2");
-               sprint (other, name);
-               sprint (other, "\n");
-       }
 -      if not(g_minstagib)
+       if(other.classname == "player")
+               { Send_Notification(NOTIF_ONE, other, MSG_MULTI, ITEM_WEAPON_GOT, wep); }
  
        self = oldself;
  }
Simple merge
index 68d1291684fd001c10519fa03f0876f49d992bc4,c464af93a27c07e05ad5493efe0cfcd4b3cb60f8..041ed3caf91fb714499aedf1bf90aace4ed868e1
@@@ -14,21 -14,22 +14,21 @@@ void W_MinstaNex_Attack (void
  
        yoda = 0;
        damage_goodhits = 0;
-       headshot = 0;
-       damage_headshotbonus = -1; // no extra damage, just count
        FireRailgunBullet (w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, 10000, 800, 0, 0, 0, 0, WEP_MINSTANEX);
-       damage_headshotbonus = 0;
  
-       if(yoda && flying)
-               AnnounceTo(self, "yoda");
 -      if(g_minstagib)
 +      if(headshot)
        {
 -              if(yoda)
 -                      AnnounceTo(self, "yoda");
 +              AnnounceTo(self, "headshot");
        }
 -      else
 +      if(damage_goodhits && self.minstanex_lasthit)
        {
-               AnnounceTo(self, "impressive");
-               damage_goodhits = 0; // only every second time
+               if(yoda && flying)
+                       AnnounceTo(self, "yoda");
+               if(damage_goodhits && self.minstanex_lasthit)
+               {
+                       AnnounceTo(self, "impressive");
+                       damage_goodhits = 0; // only every second time
+               }
        }
  
        self.minstanex_lasthit = damage_goodhits;