]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into Lyberta/URS3
authorLyberta <lyberta@lyberta.net>
Sun, 10 Sep 2017 23:19:54 +0000 (02:19 +0300)
committerLyberta <lyberta@lyberta.net>
Sun, 10 Sep 2017 23:19:54 +0000 (02:19 +0300)
1  2 
qcsrc/common/t_items.qc
qcsrc/server/miscfunctions.qc

diff --combined qcsrc/common/t_items.qc
index a1b0ced6966e57600a16366048376d4b7e873ba5,c116b440c42a4686ff8b034f0e3b800e2092c8fd..3e9fb141211cd3904f2416ad727d8af84381ff03
@@@ -901,6 -901,7 +901,7 @@@ LABEL(pickup
                                if(it.itemdef) // is a registered item
                                {
                                        Item_Show(it, -1);
+                                       it.scheduledrespawntime = 0;
                                        RandomSelection_AddEnt(it, it.cnt, 0);
                                }
                        });
@@@ -1032,14 -1033,14 +1033,14 @@@ float ammo_pickupevalfunc(entity player
                        if(!(player.weapons & (it.m_wepset)))
                                continue;
  
 -                      switch(it.ammo_field)
 +                      switch(it.ammo_type)
                        {
 -                              case ammo_shells:  need_shells  = true; break;
 -                              case ammo_nails:   need_nails   = true; break;
 -                              case ammo_rockets: need_rockets = true; break;
 -                              case ammo_cells:   need_cells   = true; break;
 -                              case ammo_plasma:  need_plasma  = true; break;
 -                              case ammo_fuel:    need_fuel    = true; break;
 +                              case RESOURCE_SHELLS:  need_shells  = true; break;
 +                              case RESOURCE_BULLETS: need_nails   = true; break;
 +                              case RESOURCE_ROCKETS: need_rockets = true; break;
 +                              case RESOURCE_CELLS:   need_cells   = true; break;
 +                              case RESOURCE_PLASMA:  need_plasma  = true; break;
 +                              case RESOURCE_FUEL:    need_fuel    = true; break;
                        }
                });
                rating = item.bot_pickupbasevalue;
index 7b008f463490a4dab3a9e48dc87029a148653078,554da5f804bbaa2b35a633053b5c3a9c1bd55fa3..479e608b73697b25845d9c522e1fa05e4948c7af
@@@ -199,14 -199,14 +199,14 @@@ string NearestLocation(vector p
  string AmmoNameFromWeaponentity(entity wpn)
  {
        string ammoitems = "batteries";
 -      switch((wpn.m_weapon).ammo_field)
 +      switch ((wpn.m_weapon).ammo_type)
        {
 -              case ammo_shells:  ammoitems = ITEM_Shells.m_name;      break;
 -              case ammo_nails:   ammoitems = ITEM_Bullets.m_name;     break;
 -              case ammo_rockets: ammoitems = ITEM_Rockets.m_name;     break;
 -              case ammo_cells:   ammoitems = ITEM_Cells.m_name;       break;
 -              case ammo_plasma:  ammoitems = ITEM_Plasma.m_name;      break;
 -              case ammo_fuel:    ammoitems = ITEM_JetpackFuel.m_name; break;
 +              case RESOURCE_SHELLS:  ammoitems = ITEM_Shells.m_name;      break;
 +              case RESOURCE_BULLETS: ammoitems = ITEM_Bullets.m_name;     break;
 +              case RESOURCE_ROCKETS: ammoitems = ITEM_Rockets.m_name;     break;
 +              case RESOURCE_CELLS:   ammoitems = ITEM_Cells.m_name;       break;
 +              case RESOURCE_PLASMA:  ammoitems = ITEM_Plasma.m_name;      break;
 +              case RESOURCE_FUEL:    ammoitems = ITEM_JetpackFuel.m_name; break;
        }
        return ammoitems;
  }
@@@ -938,8 -938,8 +938,8 @@@ bool EliminatedPlayers_SendEntity(entit
        serialize(byte, out, sendflags);
        if (sendflags & 1) {
                for (int i = 1; i <= maxclients; i += 8) {
-                   int f = 0;
-             entity e = edict_num(i);
+                       int f = 0;
+                       entity e = edict_num(i);
                        for (int b = 0; b < 8; ++b, e = nextent(e)) {
                                if (eliminatedPlayers.isEliminated(e)) {
                                        f |= BIT(b);