Skip to content

Commit

Permalink
Don't check for server because this isn't the networking branch ya twat
Browse files Browse the repository at this point in the history
  • Loading branch information
xezno committed Sep 7, 2024
1 parent eb16f9e commit 8a15f83
Showing 1 changed file with 8 additions and 17 deletions.
25 changes: 8 additions & 17 deletions Samples/mocha-minimal/code/Game.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 8a15f83

Please sign in to comment.