Fix an integer overflow when calculating selection priorities.
This commit is contained in:
@@ -83,7 +83,7 @@ namespace OpenRA.Traits
|
||||
bounds.Top + bounds.Size.Height / 2);
|
||||
|
||||
var pixelDistance = (centerPixel - selectionPixel).Length;
|
||||
return ((long)-pixelDistance << 32) + info.SelectionPriority(modifiers);
|
||||
return info.SelectionPriority(modifiers) - (long)pixelDistance << 16;
|
||||
}
|
||||
|
||||
static readonly Actor[] NoActors = { };
|
||||
|
||||
Reference in New Issue
Block a user