Skip to content

Commit a7d7864

Browse files
committed
Removed references to NOPHYS configuration
1 parent 6afce74 commit a7d7864

1 file changed

Lines changed: 0 additions & 17 deletions

File tree

Concealment/ConcealmentPlugin.cs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,8 @@ private void ConcealEntity(IMyEntity entity)
190190
return;
191191

192192
entity.GetStorage().SetValue(Id, "True");
193-
#if !NOPHYS
194193
MyGamePruningStructure.Remove((MyEntity)entity);
195194
entity.Physics?.Deactivate();
196-
#endif
197195
UnregisterRecursive(entity);
198196

199197
void UnregisterRecursive(IMyEntity e)
@@ -213,10 +211,8 @@ private void RevealEntity(IMyEntity entity)
213211
return;
214212

215213
entity.GetStorage().SetValue(Id, "False");
216-
#if !NOPHYS
217214
MyGamePruningStructure.Add((MyEntity)entity);
218215
entity.Physics?.Activate();
219-
#endif
220216
RegisterRecursive(entity);
221217

222218
void RegisterRecursive(IMyEntity e)
@@ -237,11 +233,9 @@ private int ConcealGroup(ConcealGroup group)
237233

238234
Log.Debug($"Concealing grids: {group.GridNames}");
239235
group.Grids.ForEach(ConcealEntity);
240-
#if !NOPHYS
241236
group.UpdateAABB();
242237
var aabb = group.WorldAABB;
243238
group.ProxyId = _concealedAabbTree.AddProxy(ref aabb, group, 0);
244-
#endif
245239
group.Closing += Group_Closing;
246240
Task.Run(() =>
247241
{
@@ -270,27 +264,16 @@ public int RevealGroup(ConcealGroup group)
270264
var count = group.Grids.Count;
271265
Log.Debug($"Revealing grids: {group.GridNames}");
272266
group.Grids.ForEach(RevealEntity);
273-
#if !NOPHYS
274267
ConcealedGroups.Remove(group);
275268
_concealedAabbTree.RemoveProxy(group.ProxyId);
276269
group.UpdatePostReveal();
277-
#endif
278270
return count;
279271
}
280272

281273
public int RevealGridsInSphere(BoundingSphereD sphere)
282274
{
283275
var revealed = 0;
284-
#if !NOPHYS
285276
_concealedAabbTree.OverlapAllBoundingSphere(ref sphere, _intersectGroups);
286-
#else
287-
foreach (var group in ConcealedGroups)
288-
{
289-
group.UpdateAABB();
290-
if (sphere.Contains(group.WorldAABB) != ContainmentType.Disjoint)
291-
_intersectGroups.Add(group);
292-
}
293-
#endif
294277
Log.Trace($"{_intersectGroups.Count} groups");
295278
foreach (var group in _intersectGroups)
296279
revealed += RevealGroup(group);

0 commit comments

Comments
 (0)