if(it.itemdef) // is a registered item
{
Item_Show(it, -1);
+ it.scheduledrespawntime = 0;
RandomSelection_AddEnt(it, it.cnt, 0);
}
});
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;
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;
}
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);