mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-15 20:08:54 +03:00
Fixed unselection selecting entity with id 0
This commit is contained in:
@@ -241,9 +241,13 @@ namespace Nuake {
|
||||
|
||||
gbuffer.Bind();
|
||||
|
||||
if (const int result = gbuffer.ReadPixel(3, pixelPos); result >= 0)
|
||||
if (const int result = gbuffer.ReadPixel(3, pixelPos); result > 0)
|
||||
{
|
||||
Selection = EditorSelection(Entity{ (entt::entity)result, Engine::GetCurrentScene().get() });
|
||||
Selection = EditorSelection(Entity{ (entt::entity)(result - 1), Engine::GetCurrentScene().get()});
|
||||
}
|
||||
else
|
||||
{
|
||||
Selection = EditorSelection(); // None
|
||||
}
|
||||
|
||||
gbuffer.Unbind();
|
||||
|
||||
Reference in New Issue
Block a user