Release Candidate 1:
- Adjusted ammo giving behaviour for weapons with clip count. - Fixed dual naming of automag/betamag.
This commit is contained in:
parent
41e42e874f
commit
b9478d3fef
5 changed files with 43 additions and 7 deletions
|
|
@ -37,12 +37,21 @@ Class Automag : UnrealWeapon
|
||||||
}
|
}
|
||||||
override bool HandlePickup( Inventory item )
|
override bool HandlePickup( Inventory item )
|
||||||
{
|
{
|
||||||
if ( sting_automags && (item.GetClass() == GetClass()) )
|
if ( item.GetClass() == GetClass())
|
||||||
{
|
{
|
||||||
SetTag(StringTable.Localize("$T_AUTOMAG2"));
|
if ( MaxAmount > 1 )
|
||||||
return Super.HandlePickup(item);
|
{
|
||||||
|
if ( Amount == 1 ) Weapon(item).AmmoGive1 = Weapon(item).AmmoGive2 = 0;
|
||||||
|
if ( Weapon(item).PickupForAmmo(self) ) item.bPickupGood = true;
|
||||||
|
let rslt = Inventory.HandlePickup(item);
|
||||||
|
if ( rslt ) SetTag(StringTable.Localize("$T_AUTOMAG2"));
|
||||||
|
return rslt;
|
||||||
|
}
|
||||||
|
else if ( Weapon(item).PickupForAmmo(self) )
|
||||||
|
item.bPickupGood = true;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return Super.HandlePickup(item);
|
return false;
|
||||||
}
|
}
|
||||||
override String PickupMessage()
|
override String PickupMessage()
|
||||||
{
|
{
|
||||||
|
|
@ -287,6 +296,7 @@ Class Automag : UnrealWeapon
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Amount = 1;
|
Amount = 1;
|
||||||
|
SetTag(StringTable.Localize("$T_AUTOMAG"));
|
||||||
}
|
}
|
||||||
override bool CheckAmmo( int fireMode, bool autoSwitch, bool requireAmmo, int ammocount )
|
override bool CheckAmmo( int fireMode, bool autoSwitch, bool requireAmmo, int ammocount )
|
||||||
{
|
{
|
||||||
|
|
@ -308,11 +318,12 @@ Class Automag : UnrealWeapon
|
||||||
Weapon.AmmoUse 1;
|
Weapon.AmmoUse 1;
|
||||||
Weapon.AmmoType2 "UMiniAmmo";
|
Weapon.AmmoType2 "UMiniAmmo";
|
||||||
Weapon.AmmoUse2 1;
|
Weapon.AmmoUse2 1;
|
||||||
Weapon.AmmoGive 30;
|
Weapon.AmmoGive 20;
|
||||||
Weapon.Kickback 180;
|
Weapon.Kickback 180;
|
||||||
UTWeapon.DropAmmo 10;
|
UTWeapon.DropAmmo 10;
|
||||||
Automag.ClipCount 20;
|
Automag.ClipCount 20;
|
||||||
Automag.SlaveClipCount 20;
|
Automag.SlaveClipCount 20;
|
||||||
|
+UNREALWEAPON.NOFIRSTGIVE;
|
||||||
}
|
}
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,9 @@ Class Betamag : UnrealWeapon
|
||||||
{
|
{
|
||||||
if ( sting_protomags && (item.GetClass() == GetClass()) )
|
if ( sting_protomags && (item.GetClass() == GetClass()) )
|
||||||
{
|
{
|
||||||
SetTag(StringTable.Localize("$T_PROTOMAG2"));
|
let rslt = Super.HandlePickup(item);
|
||||||
return Super.HandlePickup(item);
|
if ( rslt ) SetTag(StringTable.Localize("$T_PROTOMAG2"));
|
||||||
|
return rslt;
|
||||||
}
|
}
|
||||||
return Super.HandlePickup(item);
|
return Super.HandlePickup(item);
|
||||||
}
|
}
|
||||||
|
|
@ -289,6 +290,7 @@ Class Betamag : UnrealWeapon
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Amount = 1;
|
Amount = 1;
|
||||||
|
SetTag(StringTable.Localize("$T_AUTOMAG"));
|
||||||
}
|
}
|
||||||
Default
|
Default
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -406,6 +406,7 @@ Class BigGun : UnrealWeapon
|
||||||
UTWeapon.DropAmmo 4;
|
UTWeapon.DropAmmo 4;
|
||||||
BigGun.ClipCount 4;
|
BigGun.ClipCount 4;
|
||||||
+EXTREMEDEATH;
|
+EXTREMEDEATH;
|
||||||
|
+UNREALWEAPON.NOFIRSTGIVE;
|
||||||
}
|
}
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -235,6 +235,7 @@ Class OLSMP : UnrealWeapon
|
||||||
Weapon.Kickback 320;
|
Weapon.Kickback 320;
|
||||||
UTWeapon.DropAmmo 50;
|
UTWeapon.DropAmmo 50;
|
||||||
OLSMP.ClipCount 100;
|
OLSMP.ClipCount 100;
|
||||||
|
+UNREALWEAPON.NOFIRSTGIVE;
|
||||||
}
|
}
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -184,12 +184,14 @@ Class UPlayer : UTPlayer
|
||||||
// force akimbo
|
// force akimbo
|
||||||
let t = FindInventory(type);
|
let t = FindInventory(type);
|
||||||
if ( t ) t.Amount = 2;
|
if ( t ) t.Amount = 2;
|
||||||
|
t.SetTag(StringTable.Localize("$T_AUTOMAG2"));
|
||||||
}
|
}
|
||||||
else if ( (type is 'Betamag') && sting_protomags )
|
else if ( (type is 'Betamag') && sting_protomags )
|
||||||
{
|
{
|
||||||
// force akimbo
|
// force akimbo
|
||||||
let t = FindInventory(type);
|
let t = FindInventory(type);
|
||||||
if ( t ) t.Amount = 2;
|
if ( t ) t.Amount = 2;
|
||||||
|
t.SetTag(StringTable.Localize("$T_PROTOMAG2"));
|
||||||
}
|
}
|
||||||
else if ( type is 'DispersionPistol' )
|
else if ( type is 'DispersionPistol' )
|
||||||
{
|
{
|
||||||
|
|
@ -801,6 +803,25 @@ Class UTeleParticle : UTMeshParticle
|
||||||
|
|
||||||
Class UnrealWeapon : UTWeapon
|
Class UnrealWeapon : UTWeapon
|
||||||
{
|
{
|
||||||
|
private int UWeaponFlags;
|
||||||
|
|
||||||
|
FlagDef NoFirstGive : UWeaponFlags, 0; // don't give ammo on first pickup (for weapons with a clip count)
|
||||||
|
|
||||||
|
override void AttachToOwner (Actor other)
|
||||||
|
{
|
||||||
|
Inventory.AttachToOwner(other);
|
||||||
|
Ammo1 = AddAmmo(Owner,AmmoType1,bNoFirstGive?0:AmmoGive1);
|
||||||
|
Ammo2 = AddAmmo(Owner,AmmoType2,bNoFirstGive?0:AmmoGive2);
|
||||||
|
SisterWeapon = AddWeapon(SisterWeaponType);
|
||||||
|
if ( Owner.player )
|
||||||
|
{
|
||||||
|
if ( !Owner.player.GetNeverSwitch() && !bNo_Auto_Switch )
|
||||||
|
Owner.player.PendingWeapon = self;
|
||||||
|
if ( Owner.player.mo == players[consoleplayer].camera )
|
||||||
|
StatusBar.ReceivedWeapon(self);
|
||||||
|
}
|
||||||
|
GivenAsMorphWeapon = false;
|
||||||
|
}
|
||||||
override void FireEffect()
|
override void FireEffect()
|
||||||
{
|
{
|
||||||
Super.FireEffect();
|
Super.FireEffect();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue