Not count voxel physics pls (#405)

This commit is contained in:
Foogs
2020-09-18 21:28:08 +03:00
committed by GitHub
parent 3d13460302
commit a4edbf3bd9

View File

@@ -94,7 +94,10 @@ namespace Torch.Server.ViewModels
FloatingObjects.Remove(floating.EntityId);
break;
case MyVoxelBase voxel:
VoxelMaps.Remove(voxel.EntityId);
if (voxel is MyPlanet || voxel is MyVoxelMap)
{
VoxelMaps.Remove(voxel.EntityId);
}
break;
}
}
@@ -121,7 +124,10 @@ namespace Torch.Server.ViewModels
FloatingObjects.Add(floating.EntityId, new FloatingObjectViewModel(floating, this));
break;
case MyVoxelBase voxel:
VoxelMaps.Add(voxel.EntityId, new VoxelMapViewModel(voxel, this));
if (voxel is MyPlanet || voxel is MyVoxelMap)
{
VoxelMaps.Add(voxel.EntityId, new VoxelMapViewModel(voxel, this));
}
break;
}
}