Skip to content

Commit

Permalink
Fix /home falling through floor bug
Browse files Browse the repository at this point in the history
  • Loading branch information
PLASMAchicken committed Dec 6, 2021
1 parent 90821ce commit 33961be
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/BPEssentials/Commands/Home/Home.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,8 @@ public void Invoke(ShPlayer player, int homeNumber = 1)
player.TS("no_appartments");
return;
}
var offset = new Vector3(-1, 0, -1);
var apartment = apartments[Math.Max(0, --homeNumber)];
if (apartment.GetRotation.y < 0.9)
{
offset = new Vector3(1, 0, 2);
}
player.GetExtendedPlayer().ResetAndSavePosition(apartment.GetPosition + offset, apartment.GetRotation, apartment.GetPlaceIndex);
player.GetExtendedPlayer().ResetAndSavePosition(apartment.spawnPoint.position, apartment.spawnPoint.rotation, apartment.GetPlaceIndex);
}
}
}

0 comments on commit 33961be

Please sign in to comment.