From 7d4765b5cd6bca4971474b6288c831aefc0b84f6 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Fri, 18 Jan 2019 11:50:26 +0200 Subject: [PATCH] - 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 --- wadsrc/static/zscript/shared/player.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wadsrc/static/zscript/shared/player.txt b/wadsrc/static/zscript/shared/player.txt index 2248ddc42..bcbaa4a57 100644 --- a/wadsrc/static/zscript/shared/player.txt +++ b/wadsrc/static/zscript/shared/player.txt @@ -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; }