if (item.spawnshieldtime)
{
if ((player_amount >= ammomax) && (item.pickup_anyway <= 0))
- {
return false;
- }
- if (amount < 0)
- TakeResourceWithLimit(player, res_type, -amount, ammomax);
- else
- GiveResourceWithLimit(player, res_type, amount, ammomax);
- return true;
}
- if (g_weapon_stay != 2)
- {
+ else if (g_weapon_stay == 2)
+ ammomax = min(amount, ammomax);
+ else
return false;
- }
if (amount < 0)
- TakeResourceWithLimit(player, res_type, -amount, min(amount, ammomax));
+ TakeResourceWithLimit(player, res_type, -amount, ammomax);
else
- GiveResourceWithLimit(player, res_type, amount, min(amount, ammomax));
+ GiveResourceWithLimit(player, res_type, amount, ammomax);
return true;
}
return;
}
+ precache_model(this.model);
+ precache_sound(this.item_pickupsound);
+
if (Item_IsLoot(this))
{
this.reset = SUB_Remove;
{
if(!have_pickup_item(this))
{
+ if(g_weaponarena == 2 && weaponid)
+ weaponsInMap |= WepSet_FromWeapon(Weapons_from(weaponid));
startitem_failed = true;
delete(this);
return;
weaponsInMap |= WepSet_FromWeapon(Weapons_from(weaponid));
- precache_model(this.model);
- precache_sound(this.item_pickupsound);
-
if ( def.instanceOfPowerup
|| def.instanceOfWeaponPickup
|| (def.instanceOfHealth && def != ITEM_HealthSmall)
this.ItemStatus |= ITS_ANIMATE2;
}
+ if(Item_IsLoot(this))
+ this.gravity = 1;
+
if(def.instanceOfWeaponPickup)
{
if (!Item_IsLoot(this)) // if dropped, colormap is already set up nicely
this.colormap = 1024; // color shirt=0 pants=0 grey
- else
- this.gravity = 1;
if (!(this.spawnflags & 1024))
this.ItemStatus |= ITS_ANIMATE1;
this.SendFlags |= ISF_COLORMAP;
POSTGIVE_RES_ROT(e, RES_HEALTH, 1, pauserothealth_finished, autocvar_g_balance_pause_health_rot, pauseregen_finished, autocvar_g_balance_pause_health_regen, SND_MEGAHEALTH, SND_Null);
if(e.superweapons_finished <= 0)
- if(STAT(WEAPONS, e) & WEPSET_SUPERWEAPONS)
+ if(!g_weaponarena && (STAT(WEAPONS, e) & WEPSET_SUPERWEAPONS))
e.superweapons_finished = autocvar_g_balance_superweapons_time;
if(e.strength_finished <= 0)