diff --git a/01_DCS/Hooks/Perun.lua b/01_DCS/Hooks/Perun.lua index 5fd483a..1b27995 100644 --- a/01_DCS/Hooks/Perun.lua +++ b/01_DCS/Hooks/Perun.lua @@ -22,7 +22,7 @@ Perun.MOTD_L2 = "Wymagamy obecnosci DCS SRS oraz TeamSpeak - szczegoly na forum" -- ###################### END OF SETTINGS - DO NOT MODIFY OUTSIDE THIS SECTION ###################### -- Variable init -Perun.Version = "v0.9.0" +Perun.Version = "v0.9.1" Perun.StatusData = {} Perun.SlotsData = {} Perun.MissionData = {} @@ -650,7 +650,6 @@ Perun.onSimulationStart = function() Perun.LogEvent("SimStart","Mission " .. Perun.MissionHash .. " started",nil,nil); Perun.StatData = {} Perun.StatDataLastType = {} - -- TBD send this to Perun end Perun.onSimulationStop = function() @@ -659,13 +658,14 @@ Perun.onSimulationStop = function() Perun.MissionHash=Perun.GenerateMissionHash(); Perun.StatData = {} Perun.StatDataLastType = {} - -- TBD send this to Perun end Perun.onPlayerDisconnect = function(id, err_code) -- Player disconnected - TBD DCS Bug, this is not triggered at this point of time + if err_code == nil then + err_code = "-1" + end Perun.LogEvent("disconnect", "Player " .. net.get_player_info(id, "name") .. " disconnected; " .. err_code,net.get_player_info(id, "name"),err_code); - -- TBD send this to Perun end Perun.onSimulationFrame = function() diff --git a/02_Windows_App/Perun_v1/01_Classes/PerunHelper.cs b/02_Windows_App/Perun_v1/01_Classes/PerunHelper.cs index 0617c05..5f4c5b6 100644 --- a/02_Windows_App/Perun_v1/01_Classes/PerunHelper.cs +++ b/02_Windows_App/Perun_v1/01_Classes/PerunHelper.cs @@ -60,6 +60,7 @@ internal class PerunHelper public static int CheckVersions() { +#if !DEBUG // Checks the versions of APP, DCS Hook and MySQL database Match match = Regex.Match(Globals.VersionPerun, @"^\d+.\d+.\d+", RegexOptions.Compiled | RegexOptions.IgnoreCase); string VersionApp = "v" + match.Groups[0].Value; @@ -90,5 +91,8 @@ internal class PerunHelper } return ReturnValue; +#else + return 1; +#endif } } \ No newline at end of file diff --git a/02_Windows_App/Perun_v1/02_Forms/form_Main.cs b/02_Windows_App/Perun_v1/02_Forms/form_Main.cs index 1b1baca..e6c4882 100644 --- a/02_Windows_App/Perun_v1/02_Forms/form_Main.cs +++ b/02_Windows_App/Perun_v1/02_Forms/form_Main.cs @@ -506,46 +506,40 @@ namespace Perun_v1 ExtSRSJson = System.IO.File.ReadAllText(con_txt_3rd_srs.Text); dynamic raw_lotatc = JsonConvert.DeserializeObject(ExtSRSJson); - for (int i = 0; i < raw_lotatc.Count; i++) + for (int i = 0; i < raw_lotatc.Clients.Count; i++) { - if (raw_lotatc[i].RadioInfo != null) + if (raw_lotatc.Clients[i].RadioInfo != null) { - int temp = raw_lotatc[i].RadioInfo.radios.Count - 1; + int temp = raw_lotatc.Clients[i].RadioInfo.radios.Count - 1; for (int j = temp; j >= 0; j--) { - raw_lotatc[i].RadioInfo.radios[j].enc.Parent.Remove(); - raw_lotatc[i].RadioInfo.radios[j].encKey.Parent.Remove(); - raw_lotatc[i].RadioInfo.radios[j].encMode.Parent.Remove(); - raw_lotatc[i].RadioInfo.radios[j].freqMax.Parent.Remove(); - raw_lotatc[i].RadioInfo.radios[j].freqMin.Parent.Remove(); - raw_lotatc[i].RadioInfo.radios[j].modulation.Parent.Remove(); - raw_lotatc[i].RadioInfo.radios[j].freqMode.Parent.Remove(); - raw_lotatc[i].RadioInfo.radios[j].volMode.Parent.Remove(); - raw_lotatc[i].RadioInfo.radios[j].expansion.Parent.Remove(); - raw_lotatc[i].RadioInfo.radios[j].channel.Parent.Remove(); - raw_lotatc[i].RadioInfo.radios[j].simul.Parent.Remove(); + raw_lotatc.Clients[i].RadioInfo.radios[j].enc.Parent.Remove(); + raw_lotatc.Clients[i].RadioInfo.radios[j].encKey.Parent.Remove(); + raw_lotatc.Clients[i].RadioInfo.radios[j].encMode.Parent.Remove(); + raw_lotatc.Clients[i].RadioInfo.radios[j].freqMax.Parent.Remove(); + raw_lotatc.Clients[i].RadioInfo.radios[j].freqMin.Parent.Remove(); + raw_lotatc.Clients[i].RadioInfo.radios[j].modulation.Parent.Remove(); + raw_lotatc.Clients[i].RadioInfo.radios[j].freqMode.Parent.Remove(); + raw_lotatc.Clients[i].RadioInfo.radios[j].volMode.Parent.Remove(); + raw_lotatc.Clients[i].RadioInfo.radios[j].expansion.Parent.Remove(); + raw_lotatc.Clients[i].RadioInfo.radios[j].channel.Parent.Remove(); + raw_lotatc.Clients[i].RadioInfo.radios[j].simul.Parent.Remove(); - if (raw_lotatc[i].RadioInfo.radios[j].name == "No Radio") + if (raw_lotatc.Clients[i].RadioInfo.radios[j].name == "No Radio") { - raw_lotatc[i].RadioInfo.radios[j].Remove(); + raw_lotatc.Clients[i].RadioInfo.radios[j].Remove(); } } - raw_lotatc[i].ClientChannelId.Parent.Remove(); - raw_lotatc[i].RadioInfo.simultaneousTransmission.Parent.Remove(); + raw_lotatc.Clients[i].ClientChannelId.Parent.Remove(); + raw_lotatc.Clients[i].RadioInfo.simultaneousTransmission.Parent.Remove(); } } - if (raw_lotatc.Count > 0) - { - ExtSRSJson = JsonConvert.SerializeObject(raw_lotatc); - ExtSRSJson = "{'type':'100','instance':'" + Int32.Parse(con_txt_dcs_instance.Text) + "','payload':'" + ExtSRSJson + "'}"; - } - else - { - ExtSRSJson = "{'type':'100','instance':'" + Int32.Parse(con_txt_dcs_instance.Text) + "','payload':{'ignore':'false'}}"; // No SRS clients connected - } + ExtSRSJson = JsonConvert.SerializeObject(raw_lotatc); + ExtSRSJson = "{'type':'100','instance':'" + Int32.Parse(con_txt_dcs_instance.Text) + "','payload':'" + ExtSRSJson + "'}"; + ExtSRSUseDefault = false; PerunHelper.AddLog(ref Globals.AppLogHistory, "SRS data loaded", 3, 0, "100", true); ExtSRSStatus = true; diff --git a/02_Windows_App/Perun_v1/Perun_v1.csproj b/02_Windows_App/Perun_v1/Perun_v1.csproj index 76a74fd..5b5f00e 100644 --- a/02_Windows_App/Perun_v1/Perun_v1.csproj +++ b/02_Windows_App/Perun_v1/Perun_v1.csproj @@ -12,29 +12,27 @@ 512 true true - true + false - ftp://s18.mydevil.net/perun/ + C:\Users\DCS\Desktop\Perun\ true - Web - true + Disk + false Foreground 7 Days false false true - http://share.porwolik.com/ftp/perun/ https://github.com/szporwolik/perun https://github.com/szporwolik/perun en Perun for DCS World szporwolik Perun - true Perun.htm - 0 - 0.9.0.%2a + 1 + 0.9.1.%2a false true true diff --git a/02_Windows_App/Perun_v1/Properties/AssemblyInfo.cs b/02_Windows_App/Perun_v1/Properties/AssemblyInfo.cs index 92ae68d..0c0b053 100644 --- a/02_Windows_App/Perun_v1/Properties/AssemblyInfo.cs +++ b/02_Windows_App/Perun_v1/Properties/AssemblyInfo.cs @@ -33,7 +33,7 @@ using System.Runtime.InteropServices; // Możesz określić wszystkie wartości lub użyć domyślnych numerów kompilacji i poprawki // przy użyciu symbolu „*”, tak jak pokazano poniżej: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.9.0.0")] -[assembly: AssemblyFileVersion("0.9.0.0")] +[assembly: AssemblyVersion("0.9.1.0")] +[assembly: AssemblyFileVersion("0.9.1.0")] [assembly: NeutralResourcesLanguage("en")] diff --git a/03_MySQL/m1081_perun.sql b/03_MySQL/m1081_perun.sql index 590ba41..14f630a 100644 --- a/03_MySQL/m1081_perun.sql +++ b/03_MySQL/m1081_perun.sql @@ -19,7 +19,7 @@ CREATE TABLE IF NOT EXISTS `pe_Config` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO `pe_Config` (`pe_Config_id`, `pe_Config_payload`) VALUES -(1, 'v0.9.0'); +(1, 'v0.9.1'); DROP TABLE IF EXISTS `pe_DataMissionHashes`; CREATE TABLE IF NOT EXISTS `pe_DataMissionHashes` (