mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 23:11:58 +00:00
- use proper interface calls to give the initial BasicArmor to the player.
The old code didn't check if giving the item was proper and just went ahead adding it to the inventory unconditionally.
This commit is contained in:
parent
b37acef0c9
commit
b360f04e28
1 changed files with 2 additions and 4 deletions
|
@ -1834,9 +1834,7 @@ class PlayerPawn : Actor
|
||||||
// BasicArmor must come right after that. It should not affect any
|
// BasicArmor must come right after that. It should not affect any
|
||||||
// other protection item as well but needs to process the damage
|
// other protection item as well but needs to process the damage
|
||||||
// before the HexenArmor does.
|
// before the HexenArmor does.
|
||||||
let barmor = BasicArmor(Spawn('BasicArmor'));
|
GiveInventoryType('BasicArmor');
|
||||||
barmor.BecomeItem ();
|
|
||||||
AddInventory (barmor);
|
|
||||||
|
|
||||||
// Now add the items from the DECORATE definition
|
// Now add the items from the DECORATE definition
|
||||||
let di = GetDropItems();
|
let di = GetDropItems();
|
||||||
|
@ -1885,7 +1883,7 @@ class PlayerPawn : Actor
|
||||||
// This problem is only detectable when it's too late to do something about it...
|
// This problem is only detectable when it's too late to do something about it...
|
||||||
ThrowAbortException("Cannot give morph item '%s' when starting a game!", di.Name);
|
ThrowAbortException("Cannot give morph item '%s' when starting a game!", di.Name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let weap = Weapon(item);
|
let weap = Weapon(item);
|
||||||
if (weap != NULL && weap.CheckAmmo(Weapon.EitherFire, false))
|
if (weap != NULL && weap.CheckAmmo(Weapon.EitherFire, false))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue