private bool IsNearRealLocation() { if (m_realMissionEntity == null) { return(false); } var boundingSphere = MySession.PlayerShip.WorldVolume; if (MyGuiScreenGamePlay.Static.CameraAttachedTo == MyCameraAttachedToEnum.Drone) { boundingSphere = MyGuiScreenGamePlay.Static.ControlledDrone.WorldVolume; } if (m_radiusOverride.HasValue) { boundingSphere.Radius = m_radiusOverride.Value; } return(m_realMissionEntity.GetIntersectionWithSphere(ref boundingSphere)); }
public override bool IsSuccess() { if (m_dummy == null) { return(false); } if (m_target == null) { return(false); } if (!m_dummy.Enabled) { return(false); } var playerBoundingSphere = MySession.PlayerShip.WorldVolume; var targetBoundingSphere = m_target.WorldVolume; var result = base.IsSuccess() || (m_dummy.GetIntersectionWithSphere(ref playerBoundingSphere) && m_dummy.GetIntersectionWithSphere(ref targetBoundingSphere)); return(result); }
private void Script_EntityAtacked(MyEntity attacker, MyEntity entity2) { var boundingSphere = MySession.PlayerShip.WorldVolume; if (MyScriptWrapper.IsPlayerShip(attacker) && m_repairPipes.IsAvailable() && m_repairPipesDummyShoot.GetIntersectionWithSphere(ref boundingSphere)) { MyScriptWrapper.SetEntityEnabled((uint)EntityId.StabilizeGasPipesShootparticle, true); MyScriptWrapper.DestroyPlayerShip(); } }