Don't mind this.

This commit is contained in:
Mari the Deer 2021-01-16 12:19:27 +01:00
commit de02cd22ff
2 changed files with 19 additions and 1 deletions

View file

@ -1,2 +1,2 @@
[default]
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r757 \cu(Fri 15 Jan 23:48:51 CET 2021)";
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r758 \cu(Sat 16 Jan 12:19:27 CET 2021)";

View file

@ -1951,6 +1951,24 @@ Class Demolitionist : PlayerPawn
}
override void AddInventory( Inventory item )
{
// hackaround for replaced keys
if ( item is 'Key' )
{
let rep = (Class<Inventory>)(GetReplacement(item.GetClass()));
if ( rep && (item.GetClass() != rep) )
{
item.Destroy();
// add the new key instead
Actor whom = player?player.mo:PlayerPawn(self);
if ( !whom.FindInventory(rep) )
{
let nk = Inventory(Spawn(rep));
nk.AttachToOwner(whom);
nk.Use(true);
}
return;
}
}
Super.AddInventory(item);
if ( !player ) return;
if ( !bInDefaultInventory )