467 Commits over 1,402 Days - 0.01cph!
Fixed a bug where calling GameObject.GetPrefab could network spawn game objects. Never network spawn game objects if its scene is a PrefabScene.
Merge branch 'master' of sbox
Don't try to auto-switch hosts if LobbyConfig.DestroyWhenHostLeaves is true. If that's true, we should only ever have the same host..
Automatically hotload user permissions if users.json is edited while the server is running - can change or add permissions without restarting the server
User perms config
Allow Json comments
Add default users.json file and change structure of config
Don't ignore game/config/users.json because we want to keep the default with comments
Return true in Connection.HasPermission if the connection is the host. We'll check user permissions from the config file for connections to a dedicated server.
Remove some test logs and make HasPermission available
LobbyConfig.HideInServerList would let you hide a lobby from appearing in any server lists in s&box but still queryable with QueryLobbies
Fix IsHidden support
Filter in the query
HideInServerList -> Hidden
Do the same when setting var
Additional cmd line fix and extra test
Improve CommandLine parser. Added CommandLineTest.
Delta snapshot improvements. Fixed a bug where it was possible for a snapshot ack to be ignored - should fix a rare and difficult to reproduce bug where sync vars can become stuck
When running commands from command line, enclose args in quotes so they aren't split again by spaces internally (Fixes Facepunch/sbox-issues#7388)
No need to log that we can't find sound event if we're headless - we won't be playing any sounds anyway
Keep dedicated server alive when reloading a game. Allow managed to decide if a connection should be accepted. Improve auto-retry.
Added net_dump_objects command to print all networked object names to console
Hide a dedicated server from the server list when disconnecting - re-enable it when a lobby is created again
SendLog on a local connection should just log the message - no need to send a network message
SendLog on a local connection should just log the message - no need to send a network message
Fix error with NetworkMode read in MapInstance. If network mode is Object then we want to NetworkSpawn the object here - this fixes networked objects from maps not appearing for clients
Server Commands / Admin Commands (#1772)
* ConVarFlags.Server and ConVarFlags.Admin and the implementation of both. When the method has a Connection type as the first parameter, that parameter will be the source. Add Connection.SendLog( LogLevel, string )
* Safety
* Add summaries
Don't send networked objects twice when the host switches scenes
Fixed a bug with the [Change] attribute not using the correct type in some cases - make sure we always use the type that the property belongs to
Start the networking thread
Move process of parsing command line switches on boot and setting ConVars and ConCmds from them from native to managed. Control when they are set / run ourselves, we'll do it in Bootstrap.Init.
Improve networked scene changing by simplifying it and no longer reusing the handshake process
Always prefer explicitly set hostname for server name when running a dedicated server
Host Stats / Local Network Stats in Console (#1758)
Increase reasonable Steam connection time for dedicated server - ensure it shuts down properly if it doesn't connect in that time frame
SendRateMin/SendRateMax tweaks
Tweak default encryption settings
Tweak delta snapshot send mode
This should have same treatment as SteamLobbySocket to be thread safe
Fixed NRE in code upgrader for HostSync in scenario where no sibling Sync is found
Only add query flag is property was set to true - otherwise remove the query flag
Obsolete HostSync, add SyncFlag, add code upgrade / fix (#1729)
Fix Send Buffer Buildup and Unreleased Message Bug (#1727)
Fixed backward compat for Authority attribute when specifying NetPermission. Ensure networking is cleaned up after game leave so any last-chance RPCs can be sent.
Actually include stats from direct connection / dedicated server with net_debug on
Added Connection.GetStats support / implementation for non-lobby Steam connections. Can view net stats for connection to dedicated server or clients connected to dedicated server as well
Cluster Delta Snapshots - Improvements to Bandwidth, Max Snapshot Size (#1717)
Resolves issues with Steam networking choking.
Some safety in Connection.All (don't add any null values to output list)
Fix Owner/Host mode RPCs not sending to target. Fix issue w/ Rider intellinse when typing Rpc. in attribute
Don't need to update editor compiler if not running in the editor. Dedicated Server won't try to compile editor stuff
Fixed loading game from .sbproj with Dedicated Server that has libraries. Iterate any libraries in the project and add them as projects before compilation
PartyRoom uses SteamId. ConnectionInfoManager ensures we write party id as SteamId. Fixes being unable to join a game. Protocol++
Store last connection string globally for reconnect. Allows you to reconnect to your last server even when disconnected. Fix a bug where host changed may be called when not appropriate, such as an initial connection.