diff options
| author | Leonardo Bishop <me@leonardobishop.com> | 2023-07-28 13:37:17 +0100 |
|---|---|---|
| committer | Leonardo Bishop <me@leonardobishop.com> | 2023-07-28 13:37:17 +0100 |
| commit | f137095304f456b06229e4d17ee8249e974fceaf (patch) | |
| tree | 23d4aa9d3c8b5ddfc432bfa68b5e4e761641f6e0 /code/Game.cs | |
| parent | 8b69e65e51507118b014a0426ae6f957b78a0707 (diff) | |
Add spectator mode
Diffstat (limited to 'code/Game.cs')
| -rw-r--r-- | code/Game.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/code/Game.cs b/code/Game.cs index f235df0..24fd79d 100644 --- a/code/Game.cs +++ b/code/Game.cs @@ -1,5 +1,6 @@
using Sandbox;
+using Sandbox.UI;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -64,6 +65,15 @@ public partial class MurderGame : Sandbox.GameManager tx.Position = tx.Position + Vector3.Up * 50.0f;
pawn.Transform = tx;
}
+
+ ChatBox.Say( client.Name + " joined the game" );
+ }
+
+ public override void ClientDisconnect( IClient client, NetworkDisconnectionReason reason )
+ {
+ base.ClientDisconnect(client, reason );
+
+ ChatBox.Say( client.Name + " left the game (" + reason.ToString() + ")" );
}
}
|
