Copy over 1.1.1 hotfix changes.

This commit is contained in:
Mari the Deer 2021-09-18 00:10:06 +02:00
commit 02bfc4340f
4 changed files with 21 additions and 6 deletions

View file

@ -1,3 +1,3 @@
[default]
SWWM_MODVER="\chSWWM \czGZ\c- \cw1.2pre \cu(Fri 17 Sep 19:46:45 CEST 2021)\c-";
SWWM_SHORTVER="\cw1.2pre \cu(2021-09-17 19:46:45)\c-";
SWWM_MODVER="\chSWWM \czGZ\c- \cw1.2pre r1 \cu(Sat 18 Sep 00:10:31 CEST 2021)\c-";
SWWM_SHORTVER="\cw1.2pre r1 \cu(2021-09-18 00:10:31)\c-";

View file

@ -8,6 +8,7 @@ Class SWWMAmmo : Ammo
String PickupTag;
Class<MagAmmo> MagAmmoType;
private int SAmmoFlags;
transient bool bSinglePrint; // used for pickup messages of mag manager
Property PickupTag : PickupTag;
Property MagAmmoType : MagAmmoType;
@ -26,11 +27,12 @@ Class SWWMAmmo : Ammo
{
if ( bUsePickupMsg ) return Super.PickupMessage();
String tagstr = "$T_"..PickupTag;
if ( Amount > 1 )
if ( (Amount > 1) && !bSinglePrint )
{
tagstr = tagstr.."S";
return String.Format("%d %s",Amount,StringTable.Localize(tagstr));
}
bSinglePrint = false;
return StringTable.Localize(tagstr);
}
@ -258,6 +260,7 @@ Class MagAmmo : Inventory abstract
int ClipSize;
int countdown;
String PickupTag;
transient bool bSinglePrint; // used for pickup messages of mag manager
Property ParentAmmo : ParentAmmo;
Property ClipSize : ClipSize;
@ -316,11 +319,12 @@ Class MagAmmo : Inventory abstract
override string PickupMessage()
{
String tagstr = "$T_"..PickupTag;
if ( Amount > 1 )
if ( (Amount > 1) && !bSinglePrint )
{
tagstr = tagstr.."S";
return String.Format("%d %s",Amount,StringTable.Localize(tagstr));
}
bSinglePrint = false;
return StringTable.Localize(tagstr);
}
@ -520,7 +524,10 @@ Class MagAmmo : Inventory abstract
Amount -= ClipSize;
given = true;
if ( Owner.CheckLocalView() )
{
SWWMAmmo(pamo).bSinglePrint = true;
pamo.PrintPickupMessage(true,pamo.PickupMessage());
}
}
if ( given ) pamo.PlayPickupSound(Owner);
return given;

View file

@ -262,7 +262,11 @@ Class CandyGun : SWWMWeapon
if ( dropamt > 0 ) ma.CreateTossable(dropamt);
ma.Amount = min(ma.MaxAmount,ma.Amount+invoker.clipcount);
ma.MagFill();
if ( CheckLocalView() ) for ( int i=0; i<min(ma.Amount,invoker.clipcount-dropamt); i++ ) ma.PrintPickupMessage(true,ma.PickupMessage());
if ( CheckLocalView() ) for ( int i=0; i<min(ma.Amount,invoker.clipcount-dropamt); i++ )
{
ma.bSinglePrint = true;
ma.PrintPickupMessage(true,ma.PickupMessage());
}
if ( min(ma.Amount,invoker.clipcount-dropamt) > 0 ) ma.PlayPickupSound(self);
invoker.clipcount = 0;
}

View file

@ -787,7 +787,11 @@ Class SilverBullet : SWWMWeapon
if ( dropamt > 0 ) ma.CreateTossable(dropamt);
ma.Amount = min(ma.MaxAmount,ma.Amount+invoker.clipcount);
ma.MagFill();
if ( CheckLocalView() ) for ( int i=0; i<min(ma.Amount,invoker.clipcount-dropamt); i++ ) ma.PrintPickupMessage(true,ma.PickupMessage());
if ( CheckLocalView() ) for ( int i=0; i<min(ma.Amount,invoker.clipcount-dropamt); i++ )
{
ma.bSinglePrint = true;
ma.PrintPickupMessage(true,ma.PickupMessage());
}
if ( min(ma.Amount,invoker.clipcount-dropamt) > 0 ) ma.PlayPickupSound(self);
}
invoker.ClipCount = 0;