From 3e77916fd2363cdeb3f45267166bf5e72dee7082 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 4 May 2017 16:32:25 -0400 Subject: [PATCH] Fix CRITICAL Pong MP bugs. --- ShiftOS.WinForms/Applications/Pong.cs | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/ShiftOS.WinForms/Applications/Pong.cs b/ShiftOS.WinForms/Applications/Pong.cs index 3e93c34..04c963f 100644 --- a/ShiftOS.WinForms/Applications/Pong.cs +++ b/ShiftOS.WinForms/Applications/Pong.cs @@ -384,7 +384,7 @@ namespace ShiftOS.WinForms.Applications } else if (msg.Name == "pong_mp_youlose") { - LoseMP(); + this.Invoke(new Action(LoseMP)); } else if (msg.Name == "pong_mp_setopponenty") { @@ -433,19 +433,28 @@ namespace ShiftOS.WinForms.Applications } else if (msg.Name == "pong_mp_youwin") { - Win(); + this.Invoke(new Action(Win)); } } public void ListMatchmakes() { lvotherplayers.Items.Clear(); + var c = new ColumnHeader(); + c.Width = lvotherplayers.Width; + c.Text = "Player"; + lvotherplayers.Columns.Clear(); + lvotherplayers.Columns.Add(c); + lvotherplayers.FullRowSelect = true; foreach (var itm in PossibleMatchmakes) { - var l = new ListViewItem(); - l.Text = itm; - lvotherplayers.Items.Add(l); + if (itm != YouGUID) + { + var l = new ListViewItem(); + l.Text = itm; + lvotherplayers.Items.Add(l); + } } if (PossibleMatchmakes.Count > 0)