aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms/Applications/Pong.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-05-04 16:32:25 -0400
committerMichael <[email protected]>2017-05-04 16:32:25 -0400
commit3e77916fd2363cdeb3f45267166bf5e72dee7082 (patch)
treec850baf9adfcece6b7c375926ad86a74e47ef7a6 /ShiftOS.WinForms/Applications/Pong.cs
parent41da0b25000f93cf405d6bf18a1597e2616731bd (diff)
downloadshiftos_thereturn-3e77916fd2363cdeb3f45267166bf5e72dee7082.tar.gz
shiftos_thereturn-3e77916fd2363cdeb3f45267166bf5e72dee7082.tar.bz2
shiftos_thereturn-3e77916fd2363cdeb3f45267166bf5e72dee7082.zip
Fix CRITICAL Pong MP bugs.
Diffstat (limited to 'ShiftOS.WinForms/Applications/Pong.cs')
-rw-r--r--ShiftOS.WinForms/Applications/Pong.cs19
1 files 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)