Fix some bugs in LongBitSet

- Use LongBitSetAllocator and not BitSetAllocator. Using the wrong allocator means all string based checks and displays would provide incorrect results.
- Remove LongBitSetAllocator.Mask which wasn't being calculated or Reset correctly. We can use world.AllPlayersMask to provide the same effect at use sites.
This commit is contained in:
RoosterDragon
2022-09-19 10:39:21 +01:00
committed by abcdefg30
parent 0080e98390
commit 3c66ca709a
3 changed files with 5 additions and 10 deletions

View File

@@ -70,7 +70,7 @@ namespace OpenRA.Mods.Common.Traits
if (IsTraitDisabled || !self.IsAtGroundLevel() || !Info.CrushClasses.Overlaps(crushClasses))
return self.World.NoPlayersMask;
return Info.CrushedByFriendlies ? self.World.AllPlayersMask : ~self.Owner.AlliedPlayersMask;
return Info.CrushedByFriendlies ? self.World.AllPlayersMask : self.World.AllPlayersMask.Except(self.Owner.AlliedPlayersMask);
}
bool CrushableInner(BitSet<CrushClass> crushClasses, Player crushOwner)