mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-27 11:53:41 +00:00
Fix doubleclicking if the unit died between the clicks following 8f36ca47a1, refs #4414, https://code.wildfiregames.com/D326
Differential Revision: https://code.wildfiregames.com/D469 Patch By: causative This was SVN commit r19583.
This commit is contained in:
@@ -968,8 +968,10 @@ function handleInputAfterGui(ev)
|
||||
{
|
||||
if (clickedEntity == INVALID_ENTITY)
|
||||
clickedEntity = Engine.PickEntityAtPoint(ev.x, ev.y);
|
||||
if (clickedEntity == INVALID_ENTITY)
|
||||
// Abort if we didn't click on an entity or if the entity was removed before the mousebuttonup event.
|
||||
if (clickedEntity == INVALID_ENTITY || !GetEntityState(clickedEntity))
|
||||
{
|
||||
clickedEntity = INVALID_ENTITY;
|
||||
if (!Engine.HotkeyIsPressed("selection.add") && !Engine.HotkeyIsPressed("selection.remove"))
|
||||
{
|
||||
g_Selection.reset();
|
||||
|
||||
Reference in New Issue
Block a user