Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- EvilSensor.cs 2014-11-10 04:21:18.972286900 -0500
- +++ EvilSensor_patched.cs 2014-11-10 03:17:12.467279400 -0500
- @@ -61,8 +61,11 @@
- floatingBuilder.Item = new MyObjectBuilder_InventoryItem() { Amount = 100, Content = new MyObjectBuilder_Ore() { SubtypeName = ore } };
- floatingBuilder.PersistentFlags = MyPersistentEntityFlags2.InScene; // Very important
- floatingBuilder.PositionAndOrientation = new MyPositionAndOrientation(Sensor.WorldMatrix.Translation + Sensor.WorldMatrix.Forward * 1.5f, Sensor.WorldMatrix.Forward, Sensor.WorldMatrix.Up);
- - var floatingObject = Sandbox.ModAPI.MyAPIGateway.Entities.CreateFromObjectBuilderAndAdd(floatingBuilder);
- -
- + var floatingObject = Sandbox.ModAPI.MyAPIGateway.Entities.CreateFromObjectBuilder(floatingBuilder);
- + if (!floatingObject.IsVisible())
- + {
- + Sandbox.ModAPI.MyAPIGateway.Entities.AddEntity(floatingObject);
- + }
- // Now it only creates ore, we will throw it later
- }
Advertisement
Add Comment
Please, Sign In to add comment