Commit Graph

171 Commits

Author SHA1 Message Date
vis2k
0425e896aa Removed NetworkLobbyManager because there's no reason why this should be in here. Unity has a NetworkLobby asset for lobby functionality, and that's how it should be. Hard coding all kinds of different classes that inherit from NetworkManager is not good for anyone. People that need it might as well use the 'fixes-only' version. 2018-07-19 17:20:09 +02:00
vis2k
db4c19e3e6 PlayerController.kMaxLocalPlayers removed because it wasn't used anywhere 2018-07-19 15:20:15 +02:00
vis2k
551a8928d6 NetworkManagerHUD: UnityEngine.Application.X changed to Application.X 2018-07-19 15:20:15 +02:00
vis2k
498433e124 Network Simulator support removed because the feature was confirmed to be broken by UNET Developers, it never worked 2018-07-19 11:48:48 +02:00
vis2k
fff714e1ec NetworkBehaviour.GetInvokerForHash parameter syntax simplified 2018-07-19 11:38:39 +02:00
vis2k
5c0cc5b99c Messages: removed OverrideTransformMessages because it wasn't used anywhere 2018-07-19 11:36:57 +02:00
vis2k
5ce07ac0a4 LogFilter.Fatal level removed because it wasn't used anywhere and Debug/Warn/Error are more than enough anyway. 2018-07-19 11:34:49 +02:00
vis2k
56278f5a84 Removed ConnectionArray class because it wasn't used anywhere. 2018-07-19 11:31:44 +02:00
vis2k
bdbafacbcb ClientScene: removed GetPlayerController function because it wasn't used anywhere and it was internal, hence couldn't be used in any project either. 2018-07-19 11:31:44 +02:00
Lymdun
545e369216 Merged in Lymdun/hlapi-community-edition-1/Lymdun/no-point-for-readsbyte-to-use-readerread-1531854999252 (pull request #34)
No point for ReadSByte() to use reader.ReadByte() with a cast
2018-07-19 08:28:08 +00:00
Paul Pacheco
658f733390 Clean warnings 2018-07-18 07:52:43 -05:00
vis2k
5002d2d281 NetworkManagerEditor: removed crc, fragmentation, maxpacketsize since it's not needed anymore; NetworkManager: improved comments for those fields 2018-07-18 14:05:30 +02:00
vis2k
a14a03b6d1 NetworkConnection: forgot to remove s_MaxPacketStats 2018-07-18 10:45:17 +02:00
vis2k
89d45e1e1b ChannelBuffer/ChannelPacket/PacketStat/GetStatsInOut/ChannelOption removed because ChanneLBuffer's job was to: buffer packets and only send them every now and then to save bandwidth, to handle fragmentation, and to handle resending reliable messages. NetworkTransport already takes care of all of that in the newer versions, e.g. with ConnectionConfig.SendDelay, so none of it is needed anymore. 2018-07-17 23:23:06 +02:00
vis2k
368543b734 NetworkConnection.IsSequencedQoS/IsReliableQoS/IsUnreliableQoS moved out of NetworkConnection class into UNetwork.cs because it's a helper function used in other places too, and makes NetworkConnection.cs less complex. 2018-07-17 22:28:31 +02:00
vis2k
f57d5ae905 NetworkConnection Send/SendUnreliable/SendByChannel syntax improved 2018-07-17 22:17:31 +02:00
vis2k
38142a6d6f NetworkConnection.m_Writer isn't cached anymore to simplify code 2018-07-17 22:16:09 +02:00
vis2k
ffa6e4e2ea NetworkCRC removed because all it did was compare each script's channelIds by sending all the script names over the network. This uses unnecessary bandwidth, causes unnecessary code complexity and makes no real sense because there's virtually no reason why anyone would modify a script's channel after building the server/client. 2018-07-17 22:06:26 +02:00
Lymdun
0bf13c3ea9 No point for ReadSByte() to use reader.ReadByte() with a cast 2018-07-17 19:16:38 +00:00
Paul Pacheco
bb605930ea Test packed UInt64 2018-07-17 07:22:46 -05:00
Paul Pacheco
6581497e0c Test WritePackedUInt32 2018-07-17 07:15:14 -05:00
vis2k
ffab181ea2 Messages: removed Peer messages because they aren't used anymore after removing the Host Migration feature 2018-07-16 21:22:17 +02:00
vis2k
7c3ce78cb4 NetworkServer.SendToReady/SendUnreliableToReady reuse SendByChannelToReady function; also uses consistent null checks and return values for all now. 2018-07-16 20:17:20 +02:00
vis2k
6f667ee2c8 NetworkServer.SendToAll/SendUnreliableToAll reuse SendByChannelToAll function 2018-07-16 20:10:43 +02:00
vis2k
225c7955cd NetworkClient.Send/SendUnreliable reuse SendByChannel function 2018-07-16 20:01:20 +02:00
vis2k
99784f58d9 NetworkHash128 tests added 2018-07-16 15:50:55 +02:00
vis2k
0cc23e411b NetworkHash128: fixed missing ) in comment 2018-07-16 15:49:13 +02:00
vis2k
6db02511cd NetworkHash128 tests added 2018-07-16 15:25:56 +02:00
vis2k
dc10b8f9d6 NetworkHash128 simplified and comments added 2018-07-16 15:24:24 +02:00
Paul Pacheco
e03c6c0dd1 Add code coverage report 2018-07-15 14:12:59 -05:00
Paul Pacheco
7e1505d8ac Set up unit test project 2018-07-15 13:15:06 -05:00
vis2k
5a20083536 NetworkServer.s_sync removed because it's not needed anymore 2018-07-15 12:37:24 +02:00
Paul Pacheco
0022da41d4 Merged in paulpach/hlapi-community-edition-lag/conditional (pull request #25)
Simplify authority assignment
2018-07-09 10:30:25 +00:00
Paul Pacheco
2ea1a9ef2d Merged in paulpach/hlapi-community-edition-lag/simpleready (pull request #21)
Make the logic simpler for ensuring the connection is ready
2018-07-03 17:21:07 +00:00
Paul Pacheco
a6b62f1608 Simplify authority assignment 2018-07-03 07:35:09 -05:00
Paul Pacheco
d3f23f7f04 Merged in paulpach/hlapi-community-edition-lag/reset2 (pull request #22)
Properly reset scene gameobjects when we receive OnObjectSpawnScene
2018-06-29 08:44:29 +00:00
vis2k
56a3bf05cd NetworkBehaviour.InvokeCommandDelegate 'IsInstanceOfType' comments added 2018-06-29 10:37:04 +02:00
Paul Pacheco
eff9287236 Simplify command invocation 2018-06-28 22:47:33 -05:00
Paul Pacheco
78d159d7da Properly reset scene gameobjects when we receive OnObjectSpawnScene 2018-06-28 19:05:20 -05:00
Paul Pacheco
8d4f6915d1 Make the logic simpler for ensuring the connection is ready 2018-06-28 08:50:13 -05:00
vis2k
ec7185ad49 Removed spaces 2018-06-28 14:46:19 +02:00
Paul Pacheco
056dc5c0c9 Merged in paulpach/hlapi-community-edition-lag/findlocal (pull request #18)
Simplify finding object
2018-06-28 12:38:59 +00:00
Paul Pacheco
35590bec44 Simpler find local object 2018-06-26 11:23:14 -05:00
Paul Pacheco
df0c183628 Merged in paulpach/hlapi-community-edition-lag/debugbuild2 (pull request #12)
Fixed debug build
2018-06-26 10:13:37 +00:00
vis2k
72ac13e74e NetworkClient.UpdateClients: remove null clients first, then update valid clients. Fixes a bug where if a client was removed, the next one would be skipped. 2018-06-26 12:09:04 +02:00
Paul Pacheco
bc20d2cbe9 Simplify Network Discovery Initializing 2018-06-24 10:53:38 -05:00
Paul Pacheco
6b97f04960 Fixed debug build 2018-06-24 09:45:41 -05:00
vis2k
59cc34eaa8 NetworkServer made entirely static, there was no real reason to have an instance since only one was active anyway. Reduces complexity, simplifies code. 2018-06-22 20:34:35 +02:00
vis2k
c86f2618a8 NetworkServerSimple removed again to greatly reduce complexity. 2018-06-22 20:01:27 +02:00
vis2k
11845a9b04 NetworkServer.InternalUpdate always calls UpdateConnections, so we can remove it from NetworkServerSimple.Update and we can remove the dontListen check. 2018-06-22 14:08:32 +02:00
vis2k
3a3f4267d5 NetworkServer.localConnections and localConnectionsFakeList replaced with .localConnection. The old lists were only for downwards compatibility, HLAPI didn't even use local connection lists anymore - it always contained only the m_localConnection entry. 2018-06-22 12:14:41 +02:00
vis2k
77057328c8 NetworkWriter.FinishMessage size check added to make sure that it fits into ushort 2018-06-22 09:32:19 +02:00
Paul Pacheco
9af7879da0 simplify fragmentation by using the new WriteBytesAndSize method 2018-06-22 09:32:19 +02:00
vis2k
3047539600 Removed UNET_HOST_MIGRATION code (wasn't stable and hosting on other people's computers never works well anyway) 2018-06-22 09:32:19 +02:00
vis2k
0a34efbaf4 NetworkReader/Writer use C#'s built in BinaryReader/Writer; removed NetworkBuffer; removed redundant .AsArray()/AsArraySegment() functions; removed unnecessary constructors 2018-06-22 09:32:19 +02:00
vis2k
c81c670c95 ConnectionArray: syntax improved to simplify code 2018-06-22 09:32:19 +02:00
vis2k
b7d128ba73 ClientScene: syntax improved to simplify code 2018-06-22 09:32:19 +02:00
vis2k
0329ed787f ChannelBuffer: removed static NetworkWriter caching to simplify code 2018-06-22 09:32:19 +02:00
vis2k
cc9f08e178 LocalClient: removed static message caching 2018-06-22 09:32:19 +02:00
vis2k
efd5c6c1ff NetworkReader/NetworkWriter uses C#'s built in BitConverter for bytes to/from float/double conversion 2018-06-22 09:32:19 +02:00
vis2k
2c80d29350 NetworkReader.ReadString doesn't convert to char[] and then to string anymore, uses Encoding.GetString instead 2018-06-22 09:32:19 +02:00
vis2k
eb65e7fba0 NetworkReader static string buffer caching removed to simplify code 2018-06-22 09:32:19 +02:00
vis2k
458bbc0566 NetworkWriter static string buffer caching removed to simplify code 2018-06-22 09:32:19 +02:00
vis2k
9de07af7c9 NetworkLobbyManager.FindSlot changed to int so it can return '-1' for 'not found', which is more obvious than Byte.MaxValue 2018-06-22 09:32:19 +02:00
vis2k
3ac3790ee7 Removed all [Obsolete] code 2018-06-22 09:32:19 +02:00
vis2k
df67e85e50 NetworkLobbyManager: syntax improved to simplify code 2018-06-22 09:32:19 +02:00
vis2k
b571a60080 NetworkLobbyPlayer: removed pointless 'dirty' flag writing since it's always '1' anyway 2018-06-22 09:32:19 +02:00
vis2k
32d780f02f NetworkManager: syntax improvements to simplify code 2018-06-22 09:32:19 +02:00
vis2k
049a73b5a8 NetworkProximityChecker: syntax improved to simplify code 2018-06-22 09:32:19 +02:00
vis2k
6504349fd9 SyncList: removed Obsolete functions 2018-06-22 09:32:19 +02:00
vis2k
7756f75ff1 NetworkServer: syntax improved to simplify code 2018-06-22 09:32:19 +02:00
vis2k
62399b4267 NetworkServer: removed removeList caching to simplify code 2018-06-22 09:32:19 +02:00
vis2k
de1cadc709 NetworkScene: syntax improvements to simplify code 2018-06-22 09:32:19 +02:00
vis2k
a9d87b512e NetworkIdentity: removed static NetworkWriter caching to simplify code 2018-06-22 09:32:19 +02:00
vis2k
d8d3ee677e NetworkIdentity: syntax improvements to simplify code 2018-06-22 09:32:19 +02:00
vis2k
ebb0844bcc NetworkConnection: syntax improvements to simplify code 2018-06-22 09:32:19 +02:00
vis2k
5fd74c29ec NetworkClient: no more fixed error buffer size 2018-06-22 09:32:19 +02:00
vis2k
4bc0711a9d NetworkClient: syntax improvements to simplify code 2018-06-22 09:32:19 +02:00
vis2k
8a976f94a2 NetworkBehaviour: syntax improvements to simplify code 2018-06-22 09:32:19 +02:00
vis2k
9e8bde6e81 Messages: syntax improvements, removed some unnecessary casts, removed some unnecessary allocations in structs 2018-06-22 09:32:19 +02:00
vis2k
aff994a1b0 LocalClient: removed static message caching to simplify code and reduce state 2018-06-22 09:32:19 +02:00
vis2k
8a748281de LocalClient: List.AddRange used instead of manually copying all entries 2018-06-22 09:32:19 +02:00
vis2k
9f14fa37f8 ChannelPacket.SendToTransport error checking flow improved for shorter and easier understandable code 2018-06-22 09:32:19 +02:00
vis2k
183d1464d5 ChannelPacket: variables moved to the top of the file 2018-06-22 09:32:19 +02:00
vis2k
798afca9ec ChannelBuffer: removed static message caching to simplify code and reduce state 2018-06-22 09:32:19 +02:00
vis2k
d1e53f5811 NetworkLobbyManager.OnValidate simplified by using Mathf.Clamp 2018-06-22 09:32:19 +02:00
vis2k
0c89e11c9f NetworkLobbyManager.OnValidate simplified by using Mathf.Clamp/Min/Max 2018-06-22 09:32:19 +02:00
vis2k
dd6f47a82d LogFilter: removed redundant log level definitions 2018-06-22 09:32:19 +02:00
vis2k
db4fe1a0f9 NetworkWriter comment improved 2018-06-22 09:32:19 +02:00
vis2k
d8dc0b829b NetworkServer: removed static message caching to simplify code and reduce state 2018-06-22 09:32:19 +02:00
vis2k
1f2f874874 NetworkManager: removed static message caching to simplify code and reduce state 2018-06-22 09:32:19 +02:00
vis2k
734db6edfe NetworkLobbyManager: removed static message caching to simplify code and reduce state 2018-06-22 09:32:19 +02:00
vis2k
8e7095262f NetworkClient: removed static message caching to simplify code and reduce state 2018-06-22 09:32:19 +02:00
vis2k
8957af215c NetworkAnimator: removed static message caching to simplify code and reduce state 2018-06-22 09:32:19 +02:00
vis2k
0d175c2844 ClientScene: removed static message caching to simplify code and reduce state 2018-06-22 09:32:19 +02:00
vis2k
c64e849b1b NetworkProximityChecker: replaced SetVis with GetComponentsInChildren 2018-06-22 09:32:19 +02:00
Paul Pacheco
5acaf30f3a Fix references to sibling project instead of built dll 2018-06-22 09:31:45 +02:00
vis2k
ae611cf82c NetworkServer.DestroyPlayersForConnection: removed unnecessary 'empty player list given to NetworkServer' warning that might happen while players are still in a lobby without entering the game world yet 2018-06-13 11:24:41 +02:00
vis2k
be9efea78c ChannelBuffer, NetworkServer: consistent packet max size check with > UInt16.MaxValue (=64kb) instead of short.MaxValue which would limit packet size to 32kb; also uses consistent '<' check now instead of '<=' sometimes 2018-06-12 22:35:36 +02:00
vis2k
b8a289ba49 ChannelBuffer MaxBufferedPackets log message fixed, logs proper max value now 2018-06-12 22:32:24 +02:00