private void Start() { SteamClient.Create(); ConsoleSystem.Run("config.load", false); ConsoleSystem.Run("serverfavourite.load", false); HudEnabled.Disable(); DatablockDictionary.Initialize(); Application.LoadLevelAdditive("GameUI"); FeedbackLog.Start(FeedbackLog.TYPE.HardwareInfo); FeedbackLog.Writer.Write(SystemInfo.deviceModel); FeedbackLog.Writer.Write(SystemInfo.deviceName); FeedbackLog.Writer.Write(SystemInfo.graphicsDeviceName); FeedbackLog.Writer.Write(SystemInfo.graphicsDeviceVendor); FeedbackLog.Writer.Write(SystemInfo.graphicsDeviceVersion); FeedbackLog.Writer.Write(SystemInfo.graphicsMemorySize); FeedbackLog.Writer.Write(SystemInfo.graphicsShaderLevel); FeedbackLog.Writer.Write(SystemInfo.operatingSystem); FeedbackLog.Writer.Write(SystemInfo.processorCount); FeedbackLog.Writer.Write(SystemInfo.processorType); FeedbackLog.Writer.Write(SystemInfo.supportedRenderTargetCount); FeedbackLog.Writer.Write(SystemInfo.supportsComputeShaders); FeedbackLog.Writer.Write(SystemInfo.supportsImageEffects); FeedbackLog.Writer.Write(SystemInfo.supportsInstancing); FeedbackLog.Writer.Write(SystemInfo.supportsRenderTextures); FeedbackLog.Writer.Write(SystemInfo.supportsRenderToCubemap); FeedbackLog.Writer.Write(SystemInfo.supportsShadows); FeedbackLog.Writer.Write(SystemInfo.supportsStencil); FeedbackLog.Writer.Write(SystemInfo.systemMemorySize); FeedbackLog.End(FeedbackLog.TYPE.HardwareInfo); Connection.GameLoaded(); }
public bool DoConnect(string strURL, int iPort) { SteamClient.Needed(); NetCull.config.timeoutDelay = 60f; if (Steam_GetSteamID() == 0) { LoadingScreen.Update("connection failed (no steam detected)"); Object.Destroy(base.gameObject); return(false); } byte[] buffer = new byte[0x400]; IntPtr pData = Marshal.AllocHGlobal(0x400); uint num2 = SteamClient_GetAuth(pData, 0x400); byte[] destination = new byte[num2]; Marshal.Copy(pData, destination, 0, (int)num2); Marshal.FreeHGlobal(pData); BitStream stream = new BitStream(false); stream.WriteInt32(0x42d); stream.WriteByte(2); stream.WriteUInt64(Steam_GetSteamID()); stream.WriteString(Marshal.PtrToStringAnsi(Steam_GetDisplayname())); stream.WriteBytes(destination); try { object[] loginData = new object[] { stream }; NetError error = NetCull.Connect(strURL, iPort, string.Empty, loginData); if (error != NetError.NoError) { LoadingScreen.Update("connection failed (" + error + ")"); Object.Destroy(base.gameObject); return(false); } } catch (Exception exception) { Debug.LogException(exception); Object.Destroy(base.gameObject); return(false); } FeedbackLog.Start(FeedbackLog.TYPE.StartConnect); FeedbackLog.Writer.Write(strURL); FeedbackLog.Writer.Write(iPort); FeedbackLog.End(FeedbackLog.TYPE.StartConnect); SteamClient.SteamClient_OnJoinServer(strURL, iPort); return(true); }
public static void LevelLoadLog(byte iStage) { FeedbackLog.Start(FeedbackLog.TYPE.LoadProgress); FeedbackLog.Writer.Write(iStage); FeedbackLog.End(FeedbackLog.TYPE.LoadProgress); }