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