- 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:
Marisa the Magician 2019-09-29 17:21:32 +02:00
commit a54f1495c7
12 changed files with 117 additions and 64 deletions

View file

@ -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()
{