Beta 4.
- Fix Dispersion Pistol altfire not ending early when releasing the button. - Dispersion Pistol now changes fire speed based on upgrade level, as intended. - Reduced Razorclaw twiddle animation frequency, it was getting annoying. - Impaler altfire now doesn't work underwater, as intended. - Impaler crystals deal less damage when underwater. - Impaler no longer loses charge underwater while the crystal is unloaded. - Impaler beam no longer homes in onto friendlies. - Fixed missing Impaler melee obituary. - Flamegun disallows firing while underwater, to prevent wasting ammo uselessly. - Flares and Seeds can be stacked until int.max (give cheats and whatnot are still capped at 20 though). - Fixed Minigun not displaying the bullet box ammo icon in the 0.83 hud. - Fixed mouse input in the main menu at high resolutions (wasn't accounting for scaling, oops). - Added "<item> selected." messages. Dunno if DT will need this too. - Light Sentry now uses the more reliable native IsHostile() function to detect targets. - [flak_m] Added "<weapon> has no ammo." messages.
This commit is contained in:
parent
c269a58b28
commit
a54f1495c7
12 changed files with 117 additions and 64 deletions
|
|
@ -643,6 +643,7 @@ Class UnrealInventory : Inventory
|
|||
Property Charge : DefaultCharge;
|
||||
|
||||
FlagDef DrawSpecial : UItemFlags, 0; // hud draws special1 as amount
|
||||
FlagDef UnlimitedCopies : UItemFlags, 1; // can pick up unlimited copies
|
||||
|
||||
// Drawstuffs under HUD
|
||||
virtual ui void PreRender( double lbottom ) {}
|
||||
|
|
@ -666,7 +667,8 @@ Class UnrealInventory : Inventory
|
|||
{
|
||||
Super.AttachToOwner(other);
|
||||
if ( !Charge ) Charge = DefaultCharge;
|
||||
InterHubAmount = MaxAmount; // it's annoying to set this per-subclass
|
||||
// it's annoying to set this per-subclass
|
||||
InterHubAmount = bUNLIMITEDCOPIES?int.max:MaxAmount;
|
||||
}
|
||||
override bool HandlePickup( Inventory item )
|
||||
{
|
||||
|
|
@ -681,17 +683,35 @@ Class UnrealInventory : Inventory
|
|||
// if there's charge to spare, increase amount
|
||||
if ( addcharge > charge )
|
||||
{
|
||||
Amount = min(MaxAmount,Amount+item.Amount);
|
||||
if ( (Amount > 0) && (Amount+item.Amount < 0) ) Amount = int.max;
|
||||
Amount = min(bUNLIMITEDCOPIES?int.max:MaxAmount,Amount+item.Amount);
|
||||
charge = addcharge-charge;
|
||||
}
|
||||
}
|
||||
else Amount = min(MaxAmount,Amount+item.Amount); // fully charged new copy, just increase
|
||||
else
|
||||
{
|
||||
if ( (Amount > 0) && (Amount+item.Amount < 0) ) Amount = int.max;
|
||||
Amount = min(bUNLIMITEDCOPIES?int.max:MaxAmount,Amount+item.Amount); // fully charged new copy, just increase
|
||||
}
|
||||
}
|
||||
else Charge = DefaultCharge; // reset charge
|
||||
item.bPickupGood = true;
|
||||
return true;
|
||||
}
|
||||
return Super.HandlePickup(item);
|
||||
if ( item.GetClass() == GetClass() )
|
||||
{
|
||||
if ( (Amount < MaxAmount) || bUNLIMITEDCOPIES || (sv_unlimited_pickup && !item.ShouldStay()) )
|
||||
{
|
||||
if ( (Amount > 0) && (Amount+item.Amount < 0) )
|
||||
Amount = int.max;
|
||||
else Amount += item.Amount;
|
||||
if ( Amount > MaxAmount && !sv_unlimited_pickup && !bUNLIMITEDCOPIES )
|
||||
Amount = MaxAmount;
|
||||
item.bPickupGood = true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue