mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
Fix sortEntitiesAlongLine mutating its lineEnd
This commit is contained in:
@@ -2085,7 +2085,7 @@ function sortEntitiesForEngagement(attackers, targets)
|
||||
*/
|
||||
function sortEntitiesAlongLine(entities, lineStart, lineEnd, sortByDirection = false)
|
||||
{
|
||||
const dir = lineEnd.sub(lineStart);
|
||||
const dir = Vector2D.sub(lineEnd, lineStart);
|
||||
const length = dir.length();
|
||||
if (length === 0)
|
||||
return entities.slice();
|
||||
|
||||
Reference in New Issue
Block a user