mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-15 09:01:24 +00:00
- swapped order of checks for picking up an item.
Failure must take precedence over the morph check because this does not return a proper toucher.
This commit is contained in:
parent
242f1458c8
commit
9402929209
1 changed files with 6 additions and 6 deletions
|
@ -1887,17 +1887,17 @@ class PlayerPawn : Actor
|
|||
bool res;
|
||||
Actor check;
|
||||
[res, check] = item.CallTryPickup(self);
|
||||
if (check != self)
|
||||
if (!res)
|
||||
{
|
||||
item.Destroy();
|
||||
item = NULL;
|
||||
}
|
||||
else if (check != self)
|
||||
{
|
||||
// Player was morphed. This is illegal at game start.
|
||||
// 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);
|
||||
}
|
||||
else if (!res)
|
||||
{
|
||||
item.Destroy();
|
||||
item = NULL;
|
||||
}
|
||||
}
|
||||
let weap = Weapon(item);
|
||||
if (weap != NULL && weap.CheckAmmo(Weapon.EitherFire, false))
|
||||
|
|
Loading…
Reference in a new issue