Commit Graph

779 Commits

Author SHA1 Message Date
Rodol Phito
09089f166d Added another clearer SetLength test, just in case. 2019-04-07 20:44:58 -05:00
Rodol Phito
63a14afdec Test that SetLength and Position work as expected 2019-04-07 20:44:58 -05:00
rodolphito
72e4e55778 fix: Added WriteBytesAndSize tests, and fixed the function to be pedantic. (#773) 2019-04-07 20:11:41 -05:00
rodolphito
99c8f5c356 fix(serialization): Added NetworkWriter tests, found and fixed a bug in Write(Ray). (#769) 2019-04-07 16:10:17 -05:00
Paul Pacheco
03c767db6a fix: Mark weaver as failed if serializing invalid type 2019-04-07 15:45:09 -05:00
rodolphito
f310c61405 tests: Add Endianness testing to NetworkWriter. (#768) 2019-04-07 15:17:35 -05:00
rodolphito
269c05bbf6 Updated debug messages in NetworkClient (#761) 2019-04-07 21:50:07 +02:00
MrGadget
3846e2f904 Fixed Lobby (#765) 2019-04-07 21:48:17 +02:00
vis2k
95d74bae60 remove outdated comment 2019-04-07 19:03:49 +02:00
rodolphito
b7ae7f006c Simplify network connection clientOwnedObjects (#758)
* Simplify network connection clientOwnedObjects

* Whoops, missed this null check in NetworkServer. Thanks vis
2019-04-07 18:57:38 +02:00
Paul Pacheco
146988a6bb style: remove blank lines 2019-04-07 11:49:25 -05:00
Paul Pacheco
6525dba77f Remove resolved TODO 2019-04-07 11:47:52 -05:00
Paul Pacheco
077be58584 refactor: move SetupWriteFuctions to Writers 2019-04-07 11:44:43 -05:00
rodolphito
765c87e80c Promote the Warning to an Error, because thats how it was before. Move it above the disconnect, in case Disconnect throws. (#756) 2019-04-07 18:41:01 +02:00
rodolphito
ecccb88be5 Follow naming conventions in NetworkBehaviour (#759) 2019-04-07 18:39:54 +02:00
rodolphito
f07ad218e0 This should have been readonly from day 1 too (#757) 2019-04-07 18:37:41 +02:00
Paul Pacheco
e01b5e4c7d refactor: Move SetupReaders in Readers class 2019-04-07 11:35:38 -05:00
Paul Pacheco
53b3f435a3 refactor: Move readerFunc to readers class 2019-04-07 11:24:13 -05:00
Paul Pacheco
bf6278a28b refactor: Move writerFuncs inside Writers.cs 2019-04-07 11:18:32 -05:00
Paul Pacheco
b3ee67ee28 refactor: remove unnecesary function 2019-04-07 11:10:28 -05:00
Paul Pacheco
b3b2673e09 refactor: remove unnecesary caches 2019-04-07 11:05:57 -05:00
MrGadget
48b155f785
Update LocalClient.cs
Corrected version
2019-04-07 04:44:10 -04:00
rodolphito
d3e3cb6a54 This should have been readonly from day 1 (#751) 2019-04-07 01:20:55 +02:00
rodolphito
f99466fa88 Remove a bunch of internals, it can be private. (#748) 2019-04-07 00:28:07 +02:00
c6burns
53be9b6d99 fix(weaver): fix #706 find system dlls (#729)
* added asmresolver back in

* disambiguate Assembly symbol

* add cache for pipeline asms

* add back precomp refs from pipeline
2019-04-06 22:02:14 +02:00
Paul Pacheco
d3baeeeec3 refactor: simplify writer/reader function lookup 2019-04-06 13:10:01 -05:00
Paul Pacheco
209a59fe73 refactor: make method private 2019-04-06 13:06:02 -05:00
Paul Pacheco
420fef509f
refactor: Move reader and writer generation to separate classes (#746)
* refactor: Move writer generation to a separate class

* refactor: Move reader generation out of weaver.cs

* refactor: Rename struct code generation functions
2019-04-06 12:53:39 -05:00
Paul Pacheco
b024362c29 refactor: simplify syncobject initialization 2019-04-06 09:12:17 -05:00
Paul Pacheco
06bbf6c3ab style: use explicit variable types 2019-04-06 08:59:35 -05:00
Paul Pacheco
4aa6b34d90 style: indent for readability 2019-04-06 08:55:34 -05:00
Paul Pacheco
cf9f12d012 refactor: follow naming conventions 2019-04-06 08:46:31 -05:00
Paul Pacheco
5dee4e0c92 refactor: Reduce ProcessMethods cognitive complexity 2019-04-06 08:37:56 -05:00
Paul Pacheco
5a8e42028c refactor: follow naming convention 2019-04-06 08:22:56 -05:00
Paul Pacheco
683ada6bd1 refactor: remove unused parameter 2019-04-06 08:21:38 -05:00
Paul Pacheco
81c9644a07 style: use explicit type 2019-04-06 08:19:34 -05:00
Paul Pacheco
34f308430b style: Make class static 2019-04-06 08:19:13 -05:00
Paul Pacheco
c77bd5c59d style: Make class static 2019-04-06 08:18:35 -05:00
Paul Pacheco
b705b67b39 style: use explicit type 2019-04-06 08:18:04 -05:00
Paul Pacheco
7e50ceaa73 style: use explicit type 2019-04-06 08:17:19 -05:00
Paul Pacheco
0b64616aa7 style: use explicit type 2019-04-06 08:14:56 -05:00
Paul Pacheco
12aa61a00d style: use explicit type 2019-04-06 08:14:21 -05:00
Paul Pacheco
02bf5a5cf6 style: use explicit type 2019-04-06 08:13:55 -05:00
Paul Pacheco
017b5203c0 refactor: Remove unused nop 2019-04-06 08:13:37 -05:00
Paul Pacheco
0fb0c3671b style: use explicit type 2019-04-06 08:12:33 -05:00
Paul Pacheco
9e6523e3fb inline variable declaration 2019-04-06 08:12:11 -05:00
Paul Pacheco
da4e9df534 style: use compound assignment 2019-04-06 08:11:33 -05:00
Paul Pacheco
744910598d style: use explicit type 2019-04-06 08:11:01 -05:00
Paul Pacheco
a95c796407 style: use explicit type 2019-04-06 08:10:19 -05:00
Paul Pacheco
15bef0bf47 refactor: remove unused nop 2019-04-06 08:09:41 -05:00
Paul Pacheco
f3a0c5763e refactor: Remove unused parameters 2019-04-06 08:08:18 -05:00
Paul Pacheco
b7b827cebe refactor: Remove unused parameters 2019-04-06 08:02:50 -05:00
Paul Pacheco
d563ec7a5c refactor: Remove unused parameter 2019-04-06 07:59:27 -05:00
Paul Pacheco
c466be0f85 style: naming conventions 2019-04-06 07:53:14 -05:00
Paul Pacheco
cadb0cc51c style: naming conventions 2019-04-06 07:50:58 -05:00
Paul Pacheco
aa75387d60 refactor: made fields readonly 2019-04-06 07:45:02 -05:00
Paul Pacheco
a302c180d3 refactor: naming convention 2019-04-06 07:43:55 -05:00
Paul Pacheco
adb16921c8 style: naming convention 2019-04-06 07:41:57 -05:00
Paul Pacheco
76392a3a4e refactor: keep consistent namespace 2019-04-06 07:33:47 -05:00
Paul Pacheco
3a7646bab7 refactor: simplify switch 2019-04-06 07:16:36 -05:00
Paul Pacheco
0e285a5645 style: use simplest function available 2019-04-06 07:05:31 -05:00
Paul Pacheco
87e962b52b style: 2 lines if 2019-04-06 07:01:48 -05:00
Paul Pacheco
eb1654f26e style: naming convention 2019-04-06 06:56:16 -05:00
Paul Pacheco
314dde7d40 style: naming convention 2019-04-06 06:53:57 -05:00
Paul Pacheco
e8679a0562 refactor: remove pointless if 2019-04-06 06:51:37 -05:00
vis2k
b202473bcf syntax 2019-04-06 13:33:38 +02:00
vis2k
9d2682eb2a NetworkServer.SetupLocalPlayerForConnection: removed unused variable 2019-04-06 13:33:18 +02:00
vis2k
512c7ff521 NetworkManager.OnServerConnectInternal: simplify code 2019-04-06 13:18:21 +02:00
vis2k
c5236f5504 ClientScene.DestroyAllClientObjects is now called from ClientScene.Shutdown so that the NetworkManager doesn't have to worry about it 2019-04-06 13:13:32 +02:00
vis2k
a9a2afd06e
Remove NetworkManager.address because it seems pointless (#744) 2019-04-06 13:03:25 +02:00
vis2k
dfd729850e NetworkIdentity.ClearObservers: simplify code 2019-04-06 12:43:22 +02:00
vis2k
dac128f036 NetworkIdentity.SetLocalPlayer: use foreach 2019-04-06 12:42:30 +02:00
vis2k
1ad3b120b6 NetworkIdentity.OnUpdateVars: reuse NetworkBehaviours which already calls GetComponents if not initialized yet 2019-04-06 12:40:46 +02:00
vis2k
242cf9f1d2 NetworkIdentity.OnStartClient: fix log message 2019-04-06 12:36:44 +02:00
vis2k
9e8dc924de NetworkClient.RegisterHandler: remove unnecessary ToString 2019-04-06 12:32:11 +02:00
vis2k
c6fffc6505 add empty line 2019-04-06 12:20:58 +02:00
vis2k
54a24d7bda ClientScene.AddPlayer: use proper variable name 2019-04-06 12:09:52 +02:00
vis2k
ef14026be4 ClientScene.RemovePlayer: shorter code 2019-04-06 12:09:00 +02:00
vis2k
fb716df129 fix: NetworkClient.Shutdown calls ClientScene.Shutdown again to properly clean up client scene. ClientScene only cleans up itself without touching transport or NetworkIdentities (fixes the bug where the player object wouldn't be destroyed after calling StopClient) 2019-04-06 12:03:57 +02:00
MrGadget
c691c07d96 Added EditorBrowsable(EditorBrowsableState.Never) to Obsoletes (#741) 2019-04-06 10:43:14 +02:00
rodolphito
333bbb062a A gift for vis. (#742) 2019-04-06 10:42:52 +02:00
rodolphito
9d0cf977f9 Use checked() syntax to throw on overflow (#740)
* Use checked() syntax to throw on overflow

* Expect exceptions in the tests. Tests pass now.
2019-04-05 19:49:49 -05:00
rodolphito
b995a98743 Fixed NetworkReader tests, everything passes now. Also sneaked in two more tests for 0-length byte arrays because the conventional test didnt apply to them, since they didnt throw when there wasnt any data for them. Also made NetworkReader throw when it can't satisfy a request to read bytes past EOS. (#739) 2019-04-05 18:37:13 -05:00
rodolphito
f64e127378 Add tests for buffer overrun, raising the bar on NetworkReader. (#734) 2019-04-06 00:20:04 +02:00
vis2k
bd9d7b9fd6 NetworkReader.ReadString throws exception again 2019-04-06 00:18:55 +02:00
vis2k
cc16df72cc Transport.TransportReceive catches exceptions and disconnects the connection after invalid data was received. (#737) 2019-04-06 00:17:45 +02:00
vis2k
7d2c5e5b0e remove empty whitespace 2019-04-05 23:48:18 +02:00
vis2k
64ed66edbe NetworkServer.InternalSetClientNotReady moved into SetClientNotReady because it can't be overwritten anymore anyway 2019-04-05 22:00:58 +02:00
vis2k
7b550fdf4b NetworkServer.SetAllClientsNotReady: simplify code 2019-04-05 22:00:15 +02:00
vis2k
a526c39228 NetworkServer.InternalReplacePlayerForConnection: rename 'playerGameObject' to 'player' for consistency with AddPlayerForConnection 2019-04-05 21:57:36 +02:00
vis2k
e27ebf65bb NetworkServer.InternalReplacePlayerForConnection: rename 'playerNetworkIdentity' to 'identity' for consistency with AddPlayerForConnection 2019-04-05 21:56:54 +02:00
vis2k
a3e9fbb5bd NetworkServer.DisconnectAllConnections: simplify code 2019-04-05 21:53:24 +02:00
vis2k
a574b181bb remove empty line 2019-04-05 21:45:01 +02:00
vis2k
fa64fa077f NetworkServer: move UpdateServerObjects into Update 2019-04-05 21:43:17 +02:00
vis2k
2048addde4 NetworkClient.RegisterSystemHandlers: add comments 2019-04-05 21:33:02 +02:00
vis2k
a7e0b2c728 Add LocalClient.cs generated meta file 2019-04-05 20:23:39 +02:00
MrGadget
355585f1fc
Fixed Typo 2019-04-05 14:21:50 -04:00
MrGadget
fdb81ca2b2 Add LocalClient.cs Dummy for Asset Store (#733)
This file should ship with 1.7 to the Asset Store, and can be removed when 1.8 is ready to publish to the store in a May 2019.
2019-04-05 20:14:02 +02:00
rodolphito
95baed5e83 Add tests for strange floats, doubles, and decimals (#732) 2019-04-05 20:13:19 +02:00
vis2k
de0b9b5789 NetworkClient.active reads from .connectState so we don't have redundant states. 2019-04-05 20:11:22 +02:00