From bda2a754662311fd69f36ad055c1ce2182c1638b Mon Sep 17 00:00:00 2001 From: Christoph Oelckers <coelckers@users.noreply.github.com> Date: Fri, 21 Dec 2018 10:27:01 +0100 Subject: [PATCH] - fixed PlayerInfo.FindMostRecentWeapon returning multiple values from a subfunction is currently not working so this has to add an indirection. --- wadsrc/static/zscript/shared/player.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wadsrc/static/zscript/shared/player.txt b/wadsrc/static/zscript/shared/player.txt index 9a06f78b4..b1d803107 100644 --- a/wadsrc/static/zscript/shared/player.txt +++ b/wadsrc/static/zscript/shared/player.txt @@ -1924,7 +1924,12 @@ class PlayerPawn : Actor native let ReadyWeapon = player.ReadyWeapon; if (player.PendingWeapon != WP_NOCHANGE) { - return player.weapons.LocateWeapon(player.PendingWeapon.GetClass()); + // Workaround for the current inability + bool found; + int slot; + int index; + [found, slot, index] = player.weapons.LocateWeapon(player.PendingWeapon.GetClass()); + return found, slot, index; } else if (ReadyWeapon != null) {