- Timestamp:
- Jan 19, 2019, 6:12:21 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/LandClaimList.cs
r326 r351 5 5 namespace AllocsFixes { 6 6 public class LandClaimList { 7 public delegate bool OwnerFilter (Player owner);7 public delegate bool OwnerFilter (Player _owner); 8 8 9 public delegate bool PositionFilter (Vector3i position);9 public delegate bool PositionFilter (Vector3i _position); 10 10 11 11 public static Dictionary<Player, List<Vector3i>> GetLandClaims (OwnerFilter[] _ownerFilters, … … 68 68 69 69 public static OwnerFilter SteamIdFilter (string _steamId) { 70 return p =>p.SteamID.Equals (_steamId);70 return _p => _p.SteamID.Equals (_steamId); 71 71 } 72 72 73 73 public static PositionFilter CloseToFilter2dRect (Vector3i _position, int _maxDistance) { 74 return v => Math.Abs (v.x - _position.x) <= _maxDistance && Math.Abs (v.z - _position.z) <= _maxDistance;74 return _v => Math.Abs (_v.x - _position.x) <= _maxDistance && Math.Abs (_v.z - _position.z) <= _maxDistance; 75 75 } 76 76 77 77 public static OwnerFilter OrOwnerFilter (OwnerFilter _f1, OwnerFilter _f2) { 78 return p => _f1 (p) || _f2 (p);78 return _p => _f1 (_p) || _f2 (_p); 79 79 } 80 80 }
Note:
See TracChangeset
for help on using the changeset viewer.