diff --git a/src/CoreLogic.cs b/src/CoreLogic.cs index 673d368..b85c683 100644 --- a/src/CoreLogic.cs +++ b/src/CoreLogic.cs @@ -46,9 +46,10 @@ internal static void Warp(Direction direction, EntityPlayer player, Vector3i sou _ = player.Buffs.AddBuff(BuffCooldownName); var userIdentifier = GameManager.Instance.persistentPlayers.GetPlayerDataFromEntityID(player.entityId).PrimaryId; + Vector3i destination = default; // note: do not inline this; mono/msbuild in linux pipeline returns error if we do: error CS0165: Use of unassigned local variable 'destination' if (CanAccess(player, userIdentifier, sourceBlockPos, sourceBlockValue, out var sourceTileEntity) && (direction == Direction.Up - ? !player.Buffs.HasBuff(BuffAtTopFloorName) && TryGetFloorAbove(userIdentifier, sourceBlockPos, sourceBlockValue, sourceTileEntity, out var destination) + ? !player.Buffs.HasBuff(BuffAtTopFloorName) && TryGetFloorAbove(userIdentifier, sourceBlockPos, sourceBlockValue, sourceTileEntity, out destination) : !player.Buffs.HasBuff(BuffAtBottomFloorName) && TryGetFloorBelow(userIdentifier, sourceBlockPos, sourceTileEntity, out destination))) { // clear above/below locks early