mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +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
12c10b5156
commit
477560e1ef
1 changed files with 6 additions and 6 deletions
|
@ -1887,17 +1887,17 @@ class PlayerPawn : Actor
|
||||||
bool res;
|
bool res;
|
||||||
Actor check;
|
Actor check;
|
||||||
[res, check] = item.CallTryPickup(self);
|
[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.
|
// Player was morphed. This is illegal at game start.
|
||||||
// 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);
|
||||||
}
|
}
|
||||||
else if (!res)
|
|
||||||
{
|
|
||||||
item.Destroy();
|
|
||||||
item = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
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