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]