this.onground_time = time + 0.5;
}
}
- else if (autocvar_cl_animate_items)
+ else if (autocvar_cl_animate_items && !this.item_simple) // no bobbing applied to simple items, for consistency's sake (no visual difference between ammo and weapons)
{
if(this.ItemStatus & ITS_ANIMATE1)
{
- if(!this.item_simple)
- this.angles += this.avelocity * frametime;
+ this.angles += this.avelocity * frametime;
float fade_in = bound(0, time - this.onground_time, 1);
setorigin(this, this.oldorigin + fade_in * ('0 0 10' + '0 0 8' * sin((time - this.onground_time) * 2)));
}
if(this.ItemStatus & ITS_ANIMATE2)
{
- if(!this.item_simple)
- this.angles += this.avelocity * frametime;
+ this.angles += this.avelocity * frametime;
float fade_in = bound(0, time - this.onground_time, 1);
setorigin(this, this.oldorigin + fade_in * ('0 0 8' + '0 0 4' * sin((time - this.onground_time) * 3)));
}
Item_SetAlpha(this);
- if(autocvar_cl_fullbright_items)
- if(this.ItemStatus & ITS_ALLOWFB)
- this.effects |= EF_FULLBRIGHT;
+ if(this.ItemStatus & ITS_ALLOWFB)
+ this.effects |= EF_FULLBRIGHT;
if(this.ItemStatus & ITS_GLOW)
{
}
}
bool pickedup = false;
- pickedup = (pickedup || Item_GiveAmmoTo(item, player, RES_HEALTH, item.max_health));
- pickedup = (pickedup || Item_GiveAmmoTo(item, player, RES_ARMOR, item.max_armorvalue));
- pickedup = (pickedup || Item_GiveAmmoTo(item, player, RES_SHELLS, g_pickup_shells_max));
- pickedup = (pickedup || Item_GiveAmmoTo(item, player, RES_BULLETS, g_pickup_nails_max));
- pickedup = (pickedup || Item_GiveAmmoTo(item, player, RES_ROCKETS, g_pickup_rockets_max));
- pickedup = (pickedup || Item_GiveAmmoTo(item, player, RES_CELLS, g_pickup_cells_max));
- pickedup = (pickedup || Item_GiveAmmoTo(item, player, RES_PLASMA, g_pickup_plasma_max));
- pickedup = (pickedup || Item_GiveAmmoTo(item, player, RES_FUEL, g_pickup_fuel_max));
+ pickedup |= Item_GiveAmmoTo(item, player, RES_HEALTH, item.max_health);
+ pickedup |= Item_GiveAmmoTo(item, player, RES_ARMOR, item.max_armorvalue);
+ pickedup |= Item_GiveAmmoTo(item, player, RES_SHELLS, g_pickup_shells_max);
+ pickedup |= Item_GiveAmmoTo(item, player, RES_BULLETS, g_pickup_nails_max);
+ pickedup |= Item_GiveAmmoTo(item, player, RES_ROCKETS, g_pickup_rockets_max);
+ pickedup |= Item_GiveAmmoTo(item, player, RES_CELLS, g_pickup_cells_max);
+ pickedup |= Item_GiveAmmoTo(item, player, RES_PLASMA, g_pickup_plasma_max);
+ pickedup |= Item_GiveAmmoTo(item, player, RES_FUEL, g_pickup_fuel_max);
if (item.itemdef.instanceOfWeaponPickup)
{
WepSet w;