From 8a15f8308e62c6a1aad7ee4b6b7c2c7b48fd7de3 Mon Sep 17 00:00:00 2001 From: Alex <12881812+xezno@users.noreply.github.com> Date: Sat, 7 Sep 2024 02:39:35 +0100 Subject: [PATCH] Don't check for server because this isn't the networking branch ya twat --- Samples/mocha-minimal/code/Game.cs | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/Samples/mocha-minimal/code/Game.cs b/Samples/mocha-minimal/code/Game.cs index cfc1944a..57d67c4b 100644 --- a/Samples/mocha-minimal/code/Game.cs +++ b/Samples/mocha-minimal/code/Game.cs @@ -11,25 +11,16 @@ public class Game : BaseGame public override void OnStartup() { - if ( Core.IsServer ) - { - // We only want to create these entities on the server. - // They will automatically be replicated to clients. + // Spawn a model to walk around in + var map = new ModelEntity( "models/dev/dev_map.mmdl" ); + map.SetMeshPhysics( "models/dev/dev_map.mmdl" ); - // Spawn a model to walk around in - var map = new ModelEntity( "models/dev/dev_map.mmdl" ); - map.SetMeshPhysics( "models/dev/dev_map.mmdl" ); + // Spawn a player + var player = new Player(); + player.Position = new Vector3( 0, 0, 50 ); - // Spawn a player - var player = new Player(); - player.Position = new Vector3( 0, 0, 50 ); - } - else - { - // UI is client-only - Hud = new UIManager(); - Hud.SetTemplate( "ui/Game.html" ); - } + Hud = new UIManager(); + Hud.SetTemplate( "ui/Game.html" ); } [Event.Tick]