Fix player placemnt bug

This commit is contained in:
2023-06-16 19:18:12 +03:00
parent 69f9b0bd4b
commit 325bea157b

View File

@@ -77,6 +77,12 @@ namespace Level
public void ChangeEnv(LevelBuilderButtons.PlacementOption placementOption) public void ChangeEnv(LevelBuilderButtons.PlacementOption placementOption)
{ {
// Can't place on the same block as player
if (cellData.cellContent == LayoutCellData.CellContent.Player)
{
return;
}
// Clean previous contents // Clean previous contents
cellData.cellContent = LayoutCellData.CellContent.None; cellData.cellContent = LayoutCellData.CellContent.None;
cellData.isTarget = false; cellData.isTarget = false;