public bool ProcessMessage(FireEventArgs message) { if (message == null) { return(false); } if (BDArmorySettings.MULTIPLAYER_VESSELS_OWNED.Contains(message.VesselId)) { return(false); } var moduleWeapon = PartUtils.GetModuleFromPart <ModuleWeapon>(message.VesselId, message.PartFlightId, message.PartCraftId); if (moduleWeapon == null) { return(false); } moduleWeapon.UpdateVisualFire(message.Fire); return(true); }
public bool ProcessMessage(TurretAimEventArgs message) { if (message == null) { return(false); } if (BDArmorySettings.MULTIPLAYER_VESSELS_OWNED.Contains(message.VesselId)) { return(false); } var moduleTurret = PartUtils.GetModuleFromPart <ModuleTurret>(message.VesselId, message.PartFlightId, message.PartCraftId); if (moduleTurret == null) { return(false); } moduleTurret.pitchTransform.localRotation = new Quaternion(message.PitchRotationX, message.PitchRotationY, message.PitchRotationZ, message.PitchRotationW); moduleTurret.yawTransform.localRotation = new Quaternion(message.YawRotationX, message.YawRotationY, message.YawRotationZ, message.YawRotationW); return(true); }