Commit Graph

8561 Commits

Author SHA1 Message Date
vis2k
75bc1cee09 ClientScene: consistent 'NetworkIdentity identity' variable naming 2018-12-17 22:37:33 +01:00
vis2k
99f2d956bb NetworkServer.UpdateServerObjects doesn't remove null values anymore because there shouldn't be any 2018-12-17 21:04:23 +01:00
vis2k
b0f51aeba0 ClientScene.SpawnSceneObject uses TryGetValue to avoid one unnecessary lookup 2018-12-17 14:32:01 +01:00
vis2k
a94b56ae66 Port type changed from int to ushort everywhere so we don't need the 0 <= port <= 65535 check anymore 2018-12-17 14:22:15 +01:00
vis2k
7463e0d811 Syntax 2018-12-17 13:40:24 +01:00
vis2k
346d20d9f3 ClientScene.GetPrefab simplified. 1 Dictionary lookup instead of 3. 2018-12-17 13:39:45 +01:00
vis2k
122820520e ClientScene.InvokeUnSpawnHandler simplified. Only 1 instead of 3 dictionary lookups. 2018-12-17 13:36:59 +01:00
vis2k
e3c894389d Removed unnecessarily complex ClientScene.GetSpawnHandler function 2018-12-17 13:35:21 +01:00
vis2k
c27a9ad1bd Removed NetworkScene, moved spawners to ClientScene 2018-12-17 13:25:36 +01:00
vis2k
5f3f057f1b Removed unused NetworkServer.ClearSpawners 2018-12-17 13:10:56 +01:00
vis2k
ba5faa37d4 Removed unused NetworkServer.s_NetworkScene 2018-12-17 13:10:48 +01:00
vis2k
fffb2b697e NetworkManager.Awake/LateUpdate/OnApplicationQuit/OnValidate/OnDestroy made virtual so inheriting classes can use them without 'new' keyword. And made public for consistency with the other virtual functions 2018-12-17 11:03:22 +01:00
vis2k
634cd43d1a ClientScene: consistent variable naming 2018-12-17 10:57:06 +01:00
vis2k
efba163554
Merge pull request #167 from vis2k/NetworkIdentity_spawned_dict
NetworkIdentity spawned dict
2018-12-17 10:42:36 +01:00
vis2k
de22b6727f Removed old comments 2018-12-16 19:51:32 +01:00
vis2k
3dc7c699e3
Merge branch 'mirror' into NetworkIdentity_spawned_dict 2018-12-16 19:50:43 +01:00
vis2k
089eba9bac ClientScene.SetLocalObject removed because it's not needed anymore 2018-12-16 19:45:10 +01:00
vis2k
6a206680d0 ClientScene.ApplySpawnPayload: replaced SetLocalObject with EnableIsClient and spawned.Add 2018-12-16 19:44:42 +01:00
vis2k
206e83ecaf LocalClient.AddLocalPlayer: removed unnecessary extra variable 2018-12-16 19:43:55 +01:00
vis2k
58a70038a9 ClientScene.ApplySpawnPayload: replaced SetLocalObject with EnableIsClient and spawned.Add 2018-12-16 19:43:13 +01:00
vis2k
1cd5c36206 NetworkServer.ActivateLocalClientScene: removed SetLocalObject and replaced it with EnableIsClient because that's all it did there. 2018-12-16 19:41:18 +01:00
vis2k
58f7abbdd0 NetworkIdentity.OnStartServer: removed SetLocalObject, replaced it with EnableIsClient because that's all it did there. 2018-12-16 19:39:58 +01:00
vis2k
9c8f6bb5af NetworkServer.DestroyObject: removed ClientScene.SetLocalObject call. It only sets it to null, which is pointless because the first line in DestroyObject removes it from spawned dictionary already. 2018-12-16 19:18:27 +01:00
vis2k
4b3dd1004e NetworkServer.SetLocalObjectOnServer removed because it's not really needed 2018-12-16 19:00:03 +01:00
vis2k
7387b2a47a NetworkScene.SetLocalObject removed. Moved code into ClientScene.SetLocalObject and NetworkServer.SetLocalObject instead. 2018-12-16 18:55:24 +01:00
vis2k
73bd9191d8 NetworkIdentity.UpdateClientServer magic replaced with EnableIsClient and EnableIsServer 2018-12-16 18:50:49 +01:00
vis2k
a848c36d6e NetworkScene.SetLocalObject simplified 2018-12-16 17:29:23 +01:00
uwee
9c0e6c36d3 Low and High rotation compression have much higher precision.
PI Change
Added Pi Math to reader and writer
Fixed cast issue
2018-12-16 10:22:58 -06:00
vis2k
64c120fe5e NetworkScene.SetLocalObject uses a NetworkIdentity parameter instead of GameObject. Simplifies callers too. ApplySpawnPayload has no more redundant GameObject parameter. NetworkIdentity can use 'this' instead of 'gameObject' to call SetLocalObject, which improves performance. 2018-12-16 17:18:18 +01:00
vis2k
467c74bf68 Added comment for strange NetworkIdentity.UpdateClientServer code 2018-12-16 16:30:39 +01:00
vis2k
c430db14d9 NetworkScene.FindLocalObject removed 2018-12-16 16:01:04 +01:00
vis2k
77ea4dff21 NetworkScene.GetNetworkIdentity replaced with NetworkIdentity.spawned.TryGetValue 2018-12-16 15:53:26 +01:00
vis2k
ab3770cf4f Use TryGetValue instead of Contains+Get 2018-12-16 15:45:04 +01:00
vis2k
43dfdec2fc No need to check ContainsKey before removing 2018-12-16 15:43:07 +01:00
vis2k
b5bb568d18 Removed unused NetworkScene.RemoveLocalObject function 2018-12-16 15:41:04 +01:00
vis2k
10229f3b96 Remove ClearLocalObjects functions and use NetworkIdentity.spawned.Clear(); instead 2018-12-16 15:39:38 +01:00
vis2k
d979a45870 NetworkIdentity.spawned dictionary to replace ClientScene.objects, NetworkServer.objects, NetworkScene.objects 2018-12-16 15:27:11 +01:00
vis2k
582bf98bdd Welcome message link updated 2018-12-15 22:08:51 +01:00
vis2k
9a72f71cc6 NetworkManager properties simplified. No need to each one twice when it has public get/set anyway. 2018-12-15 22:01:31 +01:00
vis2k
f8d87c761e Simplify public getters (only lists/dicts that can be cleared from outside anyway. doesn't break any serialization either) (#161)
* NetworkConnection.visList simplified

* NetworkClient.allClients simplified

* NetworkScene public getters simplified. They are internal anyway, can't set them from the outside

* NetworkServer.connections simplified

* NetworkServer.handlers simplified

* NetworkServer.dontListen simplified

* NetworkServer.useWebSockets simplified

* ClientScene.spawnableObjects simplified

* NetworkConnection.clientOwnedObjects simplified

* NetworkManager.spawnPrefabs simplified

* NetworkManager.startPositions simplified
2018-12-15 18:13:29 +01:00
uwee
d2c68cabc1 Moved High rotation compression to Low. Added new High that converts rotation to a byte. (#158) 2018-12-15 17:07:16 +01:00
vis2k
320e70453f
NetworkManager.s_PendingSingleton removed because script reloads were neither detected properly, nor is there any chance of Mirror to continue running properly after script reloads. (#159) 2018-12-15 16:54:45 +01:00
vis2k
84b70dbb92 UNetDomainReload code removed because UnityEngine doesn't call this function in Mirror anyway. 2018-12-15 16:23:24 +01:00
vis2k
72062bbe08 Syntax 2018-12-15 16:17:15 +01:00
vis2k
07000f7d47 Removed old comment 2018-12-15 16:06:22 +01:00
vis2k
d3e13c77af Removed unnecessary syntax 2018-12-15 16:01:11 +01:00
vis2k
29f106fb32 Syntax 2018-12-15 15:53:07 +01:00
vis2k
666af57146 Less confusing syntax 2018-12-15 15:51:37 +01:00
vis2k
04fdce47c9 Removed unused NetworkScene.RemoveLocalObjectAndDestroy 2018-12-15 15:39:39 +01:00
vis2k
88232d244b Updated Telepathy to latest version (SendTimeout) 2018-12-15 15:37:54 +01:00