Skip to content

Commit

Permalink
Fix logic for moving all entities in the map.
Browse files Browse the repository at this point in the history
  • Loading branch information
isadorasophia committed Jan 2, 2025
1 parent af2ebb1 commit 06138a5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Murder.Editor/CustomEditors/WorldAssetEditor_Tile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -338,16 +338,16 @@ private void MoveAllEntities(Point offset, ImmutableArray<Guid> entities)
continue;
}

if (!entity.HasComponent(typeof(ITransformComponent)))
if (!entity.HasComponent(typeof(PositionComponent)))
{
// Entity doesn't really have a transform component to move.
continue;
}

IMurderTransformComponent? transform =
(IMurderTransformComponent)entity.GetComponent(typeof(IMurderTransformComponent));
(PositionComponent)entity.GetComponent(typeof(PositionComponent));

ReplaceComponent(parent: null, entity, transform.Add(worldDelta));
ReplaceComponent(parent: null, entity, (PositionComponent)transform.Add(worldDelta));
}
}
}
Expand Down

0 comments on commit 06138a5

Please sign in to comment.