- workaround code generation issue in PlayerPawn.FindMostRecentWeapon()

Multiple values in returned from a subfunction cannot be used directly as a function result

https://forum.zdoom.org/viewtopic.php?t=63284
This commit is contained in:
alexey.lysiuk 2019-01-18 11:50:26 +02:00 committed by Christoph Oelckers
parent 8aa47e664e
commit 7d4765b5cd
1 changed files with 2 additions and 1 deletions

View File

@ -2175,7 +2175,8 @@ class PlayerPawn : Actor
// look for its non-powered up version.
if (ReadyWeapon.bPOWERED_UP && ReadyWeapon.SisterWeaponType != null)
{
return player.weapons.LocateWeapon(ReadyWeapon.SisterWeaponType);
[found, slot, index] = player.weapons.LocateWeapon(ReadyWeapon.SisterWeaponType);
return found, slot, index;
}
return false, 0, 0;
}