userConnacancel
branchsbox/mastercancel

296 Commits over 1,127 Days - 0.01cph!

9 Days Ago
Serialize and Deserialize Scene properties such as Time Scale, Fixed Update Frequency, Threaded Animation... joining clients will now have correct values for the Scene. These don't replicate when changed after that though. Fixes Facepunch/sbox-issues#4483
9 Days Ago
When creating networked object from remote (networked), wrap Deserialize and NetworkSpawnRemote in CallbackBatch so that _net is initialized before OnAwake is called. Fixes Facepunch/sbox-issues#4950
10 Days Ago
Use StringTable.Remove instead of StringTable.Entries.Remove when removing Connection from ConnectionInfoManager. Fixes Facepunch/sbox-issues#4983
12 Days Ago
Specify in documentation that NetPermission.OwnerOnly works the same as NetPermission.HostOnly for static actions.
12 Days Ago
Minor correction
12 Days Ago
Fixed reading String Table snapshot that has an entry with 0 elements throwing an exception. Instead, ByteStream.ReadArray should return null (empty span) if it has a length of 0. Added a test to prove the bug. Fixes Facepunch/sbox-issues#5357
12 Days Ago
Serialize Component FullName instead of ClassName. Fixes cases where two components with the same name exist in different namespaces, sometimes the wrong one will be serialized. Fully backwards compatible. Fixes Facepunch/sbox-issues#5331
17 Days Ago
Fixed NetPermission not working for static Rpcs (Fixes Facepunch/sbox-issues#5188)
17 Days Ago
Fix failing test, use float.PositiveInfinity not -1
17 Days Ago
NetList implements IList, IList<T> NetDictionary implements IDictionary, IDictionary<TKey,TValue>
23 Days Ago
Avoid collection modified error in NetworkPrune (Fixes Facepunch/sbox-issues#5280)
30 Days Ago
Temp comment out this line to fix tests
30 Days Ago
Object Snapshot Refresh (#1500) * Initial commit * Component id + prune those for refresh as well * Serialize id properly * OnRefresh * Fix refresh for bones * Revert comp ids on this branch * Use Id not __id as that is what was settled with for Component Ids * When a component is added to a GameObject after it has been network spawned, and it has Sync vars we should register them with the network table * Don't do on the root though save that for the multi-comp PR * Include latest table snapshot with full refresh. Update to support __guid * Undo this bit * Added Connection.CanRefreshObjects permission (def: true) * Add checks for CanRefreshObjects to Network.Refresh() and when OnObjectRefresh is called * Register properties recursively when sending network refresh or receiving one * Test to re-register Sync props after Network.Refresh * Make docs clearer * If a Component isn't valid then just set the property anyway for a Sync var * By default, clients (except host) can NOT refresh network objects. Host can change this with Connection.CanRefreshObjects * Some additional validation checks * Better logic * Fix issue with nested types not having correct identity hash for wrapped property codegen
32 Days Ago
Multi-Component Sync Vars + Sync Vars in Children (#1503) * Support for multiple components of the same type on a Network Object to have sync vars. Adding support for children of a network object that aren't themselves network objects to have components with Sync vars too * Register and unregister Sync properties for child gos/comps appropriately * It goes here * Also unregister/register sync properties accordingly when GameObject id changes * NetworkMode can't be changed from NetworkMode.Object if we are actually a networked object (_net is valid) * Simplify a bunch - allow setting property if slot not registered * Remove unused UnregisterProperties methods * Add a test to make sure child sync vars are added to network table * Suppress these warnings for now - there are legitimate reasons why we might not find these GOs * Suppress unknown slot
37 Days Ago
Authority RPC now correctly uses invoke permissions from the AuthorityAttribute. When calling Authority RPC, if there's no owner, the target would be the host connection
37 Days Ago
Authority check for network destroy - can never arbitrarily destroy unnetworked objects
37 Days Ago
In the PrefabFile upgrader, upgrade Id to __guid as well if possible, fixes corrupt prefabs from before when it was called Id
37 Days Ago
Fixes unable to parse guid error when trying to load properties called "id" but the type is not a guid (Fixes Facepunch/sbox-issues#5181)
37 Days Ago
When a component is added to a GameObject after it has been network spawned, and it has Sync vars we should register them with the network table Don't do on the root though save that for the multi-comp PR
37 Days Ago
Update SceneEditorMenus to use MakeIdGuidsUnique instead of MakeGameObjectsUnique
37 Days Ago
Unforseen but when we link component reference from a prefab to property on something else in scene, we should still store component reference like we used to. We'll try to find the component in the scene directory by id if we can, but revert to old behavior if not
37 Days Ago
Put in guards against people having a property name of "id" (case-insensitive) on a component. Warn them if they do, don't serialize that property or try to deserialize it. Catch exception if trying to deserialize Id as a Guid but it isn't one.
37 Days Ago
Component Ids (#1501) * Component id + prune those for refresh as well * Serialize id properly * Add unit tests for component id serialization / deserialization - make sure references to Components with Property are properly restored to the correct components by id * Update GameObjectInspector to use Component.Id to determine already seen components. This makes it rebuild properly for multiple components of the same type * Serialize as Id not __id so also picked up by MakeGameObjectsUnique * Scene unique component ids - update serialization test accordingly * Phase out storing GO guid and component type * MakeGameObjectsUnique -> MakeIdGuidsUnique (make old method Obsolete and redirect to MakeIdGuidsUnique) * Unit test for clone with references * When adding component or game object to Directory - check is there a component or game object with that id already, if so, force change it to a new one and spit a warning out. No component or game object should ever be able to share the same guid anyway but this makes sure * Add test for loading old reference model type from prefab / json * Test both old and new formats * Let's not make this elseif - always check both
38 Days Ago
Allow both Sync and HostSync on a property. It means that both the Owner and the Host can control the value. Fixes Facepunch/sbox-issues#5153
39 Days Ago
OnDestroyInternal should be internal
40 Days Ago
Game Object Network Mode Selection https://files.facepunch.com/conna/1b0711b1/sbox-dev_G97N4pdA3q.png (#1495)
40 Days Ago
Fixes local interpolation jitter
44 Days Ago
Fixed a boo boo
44 Days Ago
ComponentFlags.NotNetworked. When a component has this flag, it won't be serialized in the scene snapshot or with a networked object when sent to other clients
44 Days Ago
Don't EditLog if we're not in the Editor. EditLog separate from BreakFromPrefab because we don't wanna do that just because we're spawning a networked object in a running scene.
44 Days Ago
Interpolation Fixes w/ Ownership Change (#1494) 🤞
45 Days Ago
Finally fixes Facepunch/sbox-issues#4716 - reloading Map Instance when recompiled in Hammer
45 Days Ago
Add support for expression bodied methods for CodeGen. Fixes Facepunch/sbox-issues#5025 Add test for expression bodied CodeGen method
47 Days Ago
When joing via new instance, Project.Current is null - this can break <style> because it can't get relative path of current file. Fix that by just using absolute path in that case. Remove unnecessary assert
50 Days Ago
Host can always drop ownership of a networked object Host can always network destroy a networked object
53 Days Ago
Fixed [Sync] vars on private properties in base classes not being registered. What a strange one! Fixes Facepunch/sbox-issues#4916
53 Days Ago
Determine fate of network objects when owner disconnects (#1463) * Can specify what happens to a network object when owner disconnects - don't love the naming * Unused usings * Some cleanup * DisconnectAction -> NetworkOrphaned. Same terms everywhere else. Add NetworkOrphaned.Random - randomly assign owner when owner disconnects - route this through the host though
59 Days Ago
Fixed Sync vars on derived component types not working
59 Days Ago
Host Sync Vars (#1462) * NetworkTable.Entry.HasControl test. Separate sending network table changes from main update. Host or Owner can send table changes (only send entries they _control_) * When using WriteAll always write all regardless of control. Make it so unless YOU control a Sync property you can't physically change its value * Revert that for now - let people change Sync var value locally as it was before, we can try to find a better way to prevent this later. Complication comes from INetworkCustom * Remove redundant call * Let''s have each entry define if it has changes now that each one can be potentially controlled by different clients. Make sure we clear changed flag on entry when reading it. NetworkTable.HasChanges will now return true if any entry we have control over is dirty * Clarify comment * Let's call it HostSync * Prevent actual setting of Sync property, modification of NetList, or NetDictionary if you don't have control over it. Non-owner, non-host can't change the values locally, they _must_ be what the synchronized value is * We can always set the property if network not initialized * Default HasControl to true for NetList/NetDictionary in-case not set
60 Days Ago
Network Authority / Permissions (#1457) * Can a connection create objects? * Send network destroy even if DestroyImmediate is called * Ownership authority flags * Let GameObject have [Sync] too (test) * Reorder enum, add [Expose] * Change up logic for can create objects - only check if we have a source * Default CanCreateObjects to true for now (this is current behavior) * Initial implementatior for ownership authority * Use NetworkAccessor for changing ownership authority. (Temp? Depending on review) don't use TL for set prop for Sync Vars * Initial implementation of Rpc authority * Remove a test log * CodeGen static array for attributes on a CodeGenerator method/prop now marked as [SkipHotload] and readonly, so they do update when changed * Make it CanSpawnObjects * CanSpawnObjects settable only by the host * Some renaming. Set OwnerTransfer direct on GameObject instead of method on NetworkAccessor * Make sure CanSpawnObjects is synchronized to clients when set from host via ConnectionInfo * Default CanSpawnObjects to true for now * When OwnerTransfer is Request, make actual requests to the host for Drop/Assign/Take ownership and if host approves, then host will send the messages to everyone to take that action. Each message will then validate if was received from host * Remove this for now, sus is later * CanSpawnObjects is always true for the host. Early out in NetworkSpawn if local connection can't spawn objects - why bother trying at all? * NetworkAccessor.SetOwnerTransfer method * Documentation fixes * Rename Rpc.HasAuthority to Rpc.HasPermission for consistency * Owner can always drop ownership * Allow owner transfer changing from current owner
2 Months Ago
Copy tags from GameObject for Legacy Particle System -> SceneObject In ParticleSpriteRenderer make sure we copy over tags from the GameObject to the SceneObject Internal ReadOnlyTagSet Parse kv tags into ObjectEntry.Tags and use them in SceneMapLoader to set any created sceneobject tags Copy tags from SceneObjects to MapObjectComponent GameObject Add some default tag from Hammer, light, text, particles Fix NRE Set some default tags for Particle and Light and Skybox components Better light tags
2 Months Ago
Clear watcher var after dispose
2 Months Ago
Fix tests
2 Months Ago
Fixes Facepunch/sbox-issues#4725 - Fixes a bunch of issues with SCSS hotloading. Style sheets weren't actually being removed when deleted or changed. Clear previously loaded style sheets properly on hotload. Properly update when stylesheet is added after it had tried to be loaded before.
2 Months Ago
Change mount logic in OnPostCompileFinished, call SceneMap.OnMapUpdated regardless. Make async and add short delays
2 Months Ago
Fixed FileSystem.NormalizeFilename changing \ to // in paths instead of to /. This fixes hotloading of .scss files in regular razor Panel (PanelComponent was fine)
3 Months Ago
NetList, NetDictionary (#1447) * Initial commit * Make NetworkTableContainer into an internal interface INetworkTableContainer. Use explicit interface implemention to keep members from being exposed to public API. * Add some exception handling * Let the INetworkTableContainer handle writing/reading whether it's only changes or a full update * Backwards compatibility for IList and IDictionary but it isn't ideal so throw a warning to use NetList and NetDictionary * Fix some documentation. Add ExchangeNetList test. When new instance of NetDictionary or NetList is created, add Reset change immediately. We want clients to know it's completely changed. * Add appropriate unit tests * Fix for hashcode * INetworkCustom. Add tests for NetList, NetDictionary. * Add example usage * Better formatting
3 Months Ago
Use EverythingInSelfAndDescendants when finding INetworkSpawn components
3 Months Ago
Update pull.yml
3 Months Ago
Do the same for 2D skybox