Commit Graph

281 Commits

Author SHA1 Message Date
Karrar
963a0d4858 Fix: prevent stack overflow in Angle implicit float conversion operator 2025-08-28 14:12:34 +03:00
Karrar
ca99e9d75f Fix: player join/leave callbacks not triggered if multiple packets from different ticks are received before the client processes them 2025-08-26 19:18:43 +03:00
Karrar
b2a77104c3 Add: validation and error logging for oversized RPCs and tick budget overflows 2025-08-26 03:05:33 +03:00
Karrar
07ca42b0c8 Fix: NetworkObject being incorrectly set as active in the server after it was disabled in Network Awake 2025-08-25 04:01:52 +03:00
Karrar
32dd3cd077 Fix: Resolve an issue where rapidly adding/removing a client’s interest in an object, while also rapidly switching the object's input source between the client and null, could result in the object not being able to resimulate in the future when interest is added again and the client is reassigned as the input source 2025-08-18 23:55:06 +03:00
Karrar
226a4f2609 Fix: Resolve an exception when restarting Netick after Network.ShutdownImmediately 2025-08-18 19:31:41 +03:00
Karrar
0843f02c15 Fix: Resolve an exception in the server when reaching Max Players in server mode 2025-08-14 00:42:46 +03:00
Karrar
7b0669ed1a Fix: Handled negative hash codes in NetworkDictionary and NetworkHashSet 2025-08-13 12:29:01 +03:00
Karrar
34214548a6 Changed Sandbox.AuthoritativeTick to only update when a tick runs, instead of when a packet is received. 2025-08-12 18:22:44 +03:00
Karrar
f446fa12bb Fixed a rare exception in the client when a network object is created or destroyed in NetworkDestroy in the server. 2025-08-07 15:35:17 +03:00
Karrar
39f61a4d7f Fixed an issue where a newly spawned object may not be fully initialized and still sent to the client, causing undefined behaviour. 2025-08-06 17:49:56 +03:00
Karrar
1ec39d8069 Fixed an issue with Sandbox.NetworkInstantiate when called during OnPlayerJoined or OnPlayerLeft. 2025-08-06 11:52:21 +03:00
Karrar
a73b60190f Added basic detection for client-server mismatches. 2025-08-06 11:04:15 +03:00
Karrar
0feb217ced Added a note in the inspector for NetworkObjectRef and NetworkBehaviourRef properties when Netick hasn't started yet. 2025-08-05 11:15:18 +03:00
Karrar
8db8713ba4 Added inspector support for showing a clickable reference to the object or behaviour referenced by NetworkObjectRef or NetworkBehaviourRef. 2025-08-05 11:04:45 +03:00
Karrar
e03d89ebb6 Fixed a codegen issue with Angle, causing it not to auto-interpolate in NetworkRender. 2025-08-04 12:01:47 +03:00
Karrar
f3b34bee4e Added Angle type. This is a helper struct that represents an angle in degrees, which automatically wraps to [0, 360) range. This type supports automatic interpolation. 2025-08-04 11:57:18 +03:00
Karrar
5f7ebf8797 Added [Serializable] attribute to NetworkBehaviourRef and NetworkObjectRef. 2025-08-04 11:00:39 +03:00
Karrar
a2fd447d1a Fixed potential misprediction-like behavior on high-ping connections when joining and immediately performing actions (e.g., moving the player). And overall, improved general CSP behavior for high-ping clients when they first join. 2025-08-04 10:55:24 +03:00
Karrar
a8fed34b90 Added try-catch around several callback invocations (e.g., NetworkAwake) to prevent exceptions in one from causing undefined behaviour. 2025-08-02 08:20:54 +03:00
Karrar
aa7e9e54a8 Added several more overloads for Sandbox.LocalInstantiate. 2025-08-02 06:24:50 +03:00
Karrar
0c18adc7c9 Added Sandbox.LocalInstantiate to replace Sandbox.Instantiate, which was frequently misused in place of Sandbox.NetworkInstantiate for spawning networked prefabs. 2025-08-02 06:12:58 +03:00
Karrar
75b8635804 Fixed an issue with SetEnabled extension method, causing it to disable an object when it's called in NetworkStart. 2025-07-31 22:04:34 +03:00
Karrar
7cde5340e7 Fixed an issue with Narrow Phase Filtering that causes Input Source objects to not sync to the Input Source client. 2025-07-31 18:32:53 +03:00
Karrar
e90c1d6533 Improved bandwidth usage when using Narrow Phase Filtering. 2025-07-30 11:36:32 +03:00
Karrar
a5c7bef946 Changed the size of LiteNetLibTransport._connectionBytes to be 1000. 2025-07-30 05:59:14 +03:00
Karrar
f449244367 Fixed an issue where invoking an RPC on the server from within another RPC (originally invoked by a client) could prevent the new RPC from being delivered to the source client, even if it was correctly scoped to them. 2025-07-28 16:10:55 +03:00
Karrar
97ee05413c Added codegen errors for the use of generic type parameters as network properties or RPC parameters. 2025-07-26 11:40:14 +03:00
Karrar
0d6fcba6d7 Fixed an issue where the previous snapshot of a network collection could be incorrect. Also fixed a bug in NetworkDictionary and NetworkHashSet where key existence checks and value retrievals could fail, despite the key being present. 2025-07-25 19:07:23 +03:00
Karrar
a77b5a2b9c Added SyncTransformOnSpawn to NetickConfig. This setting, enabled by default, controls whether the initial position and rotation of spawned objects are synchronized at spawn time. Disabling it can help reduce bandwidth usage or serve as an information-hiding measure. 2025-07-24 01:34:45 +03:00
Karrar
55c8cd5b54 Added an optional predicate parameter to lag compensation queries to allow custom filtering of potential containers during the broadphase stage, improving control over query results. 2025-07-23 00:47:51 +03:00
Karrar
758b073942 Fixed Netick throwing an exception on the client when an object's parent was changed without using NetworkObject.SetParent. 2025-07-22 19:41:57 +03:00
Karrar
a637c9fc92 Fixed an issue with the previous commit. 2025-07-22 06:06:11 +03:00
Karrar
4d97886a3c Changed NetworkObject.Id to return -1 when the object is spawned but the client is not interested in it and hasn't yet received any state for it. 2025-07-22 01:09:40 +03:00
Karrar
3ece834de2 Changed NetworkAwake (in the client) to invoke after the object state has been applied. 2025-07-21 00:08:08 +03:00
Karrar
54e7f6d8ed Updated XML documentation. 2025-07-20 19:23:21 +03:00
Karrar
681f67c135 Fixed an exception on startup when a NetickBehaviour is present on the sandbox prefab. 2025-07-19 19:18:45 +03:00
Karrar
5f77e7b394 Added IsMarkedForDestruction to NetworkObject. This flag returns true if Sandbox.Destroy has been invoked on an object in the server, and the object is scheduled to be removed from the simulation (destroyed) at the end of the current tick. 2025-07-19 00:07:24 +03:00
Karrar
823fbb5e53 Fixed an issue with static RPCs with RpcPeers.Owner target, which are invoked by the owner/server. 2025-07-17 17:41:45 +03:00
Karrar
6f63dc3b1a Fixed an issue with static RPCs with RpcPeers.Owner source. 2025-07-17 17:29:38 +03:00
Karrar
276dcb2a65 Fixed an issue when changing the networked state of objects in an additive scene that is being unloaded, causing spawned objects in the future not to sync. 2025-07-17 02:49:46 +03:00
Karrar
d405291150 Added IsInterested to NetworkObject and NetworkBehaviour. On the client, it returns true if this client is interested in this object. On the server, it always returns true. 2025-07-16 23:51:02 +03:00
Karrar
d73fc09caa Fixed an issue with NetworkBehaviour.IsPredicted returning false in NetworkAwake for predicted objects. 2025-07-16 23:20:01 +03:00
Karrar
dd1274a9ca Changed the syncing logic of a network object's parent to prevent null reference exceptions when the user sets the object's parent to null using transform.parent or transform.SetParent (instead of NetworkObject.SetParent), and the previous parent is later destroyed. 2025-07-16 17:59:39 +03:00
Karrar
63fabfadda Fixed an issue where targeted RPCs with target: RpcPeers.Everyone were not invoked on the target player if the caller was the target player. 2025-07-16 01:14:06 +03:00
Karrar
035bc58c2b Fixed issue with accessing Length getter of Network Array Structs. 2025-07-16 00:14:49 +03:00
Karrar
d67e299b44 Fixed a code gen issue with static RPCs with no serializable parameters. 2025-07-16 00:08:55 +03:00
Karrar
e0b6616f93 Fixed a codegen issue with Guid type. 2025-07-09 14:23:18 +03:00
Karrar
cccdbffd65 Fixed a null reference exception in Sandbox.SetPlayerObject when passed a null player object. 2025-07-09 07:13:48 +03:00
Karrar
f6ea3fd0f6 Added Sandbox.GetBehavioursOfType to performantly get all scripts (in the simulation) of a specific type. 2025-07-08 15:43:01 +03:00