Skip to content

Commit 6aa4fb9

Browse files
authored
Make SpriteSystem.LayerExists say layer index 0 is valid (space-wizards#6305)
1 parent a9ba919 commit 6aa4fb9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Robust.Client/GameObjects/EntitySystems/SpriteSystem.Layer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public bool LayerExists(Entity<SpriteComponent?> sprite, int index)
1717
if (!_query.Resolve(sprite.Owner, ref sprite.Comp))
1818
return false;
1919

20-
return index > 0 && index < sprite.Comp.Layers.Count;
20+
return index >= 0 && index < sprite.Comp.Layers.Count;
2121
}
2222

2323
public bool TryGetLayer(

0 commit comments

Comments
 (0)