- fixed PlayerInfo.FindMostRecentWeapon

returning multiple values from a subfunction is currently not working so this has to add an indirection.
This commit is contained in:
Christoph Oelckers 2018-12-21 10:27:01 +01:00
parent ebaabcfb4f
commit 1deedd5671

View file

@ -1924,7 +1924,12 @@ class PlayerPawn : Actor native
let ReadyWeapon = player.ReadyWeapon; let ReadyWeapon = player.ReadyWeapon;
if (player.PendingWeapon != WP_NOCHANGE) 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) else if (ReadyWeapon != null)
{ {