Merge pull request #5404 from RoosterDragon/remove-as-hashset

Changed removeActorPosition field in ActorMap into a set.
This commit is contained in:
Chris Forbes
2014-05-25 10:53:19 +12:00

View File

@@ -49,8 +49,8 @@ namespace OpenRA.Traits
// Position updates are done in one pass // Position updates are done in one pass
// to ensure consistency during a tick // to ensure consistency during a tick
List<Actor> addActorPosition; readonly List<Actor> addActorPosition = new List<Actor>();
List<Actor> removeActorPosition; readonly HashSet<Actor> removeActorPosition = new HashSet<Actor>();
public ActorMap(World world, ActorMapInfo info) public ActorMap(World world, ActorMapInfo info)
{ {
@@ -64,9 +64,6 @@ namespace OpenRA.Traits
for (var j = 0; j < rows; j++) for (var j = 0; j < rows; j++)
for (var i = 0; i < cols; i++) for (var i = 0; i < cols; i++)
actors[j * cols + i] = new List<Actor>(); actors[j * cols + i] = new List<Actor>();
addActorPosition = new List<Actor>();
removeActorPosition = new List<Actor>();
} }
public IEnumerable<Actor> GetUnitsAt(CPos a) public IEnumerable<Actor> GetUnitsAt(CPos a)