Commit Graph

3440 Commits

Author SHA1 Message Date
Paul Pacheco
2a3470dfb4 Helpers should not be instantiated 2020-03-24 20:08:42 -05:00
Paul Pacheco
b740b2487b this is not code 2020-03-24 20:07:30 -05:00
Paul Pacheco
260e37cbb2 Reduce cognitive complexity of OnCompilationFinished 2020-03-24 20:04:34 -05:00
Paul Pacheco
6f04ff77d7 Remove commented out code 2020-03-24 20:02:49 -05:00
Paul Pacheco
48cf45b8ce Remove unused method 2020-03-24 20:01:55 -05:00
Paul Pacheco
f4bc7ca691 use same parameter name in override 2020-03-24 20:01:00 -05:00
Paul Pacheco
433818b440 Remove cognitive complexity of NetworkInformation
Split up large method,
Use static variables instead of fields
2020-03-24 19:58:39 -05:00
Chris Langsenkamp
85c4f1bcf1 Remove unused variable 2020-03-24 17:58:04 -04:00
vis2k
347cb5374d
fix: #1593 - NetworkRoomManager.ServerChangeScene doesn't destroy the world player before replacing the connection. otherwise ReplacePlayerForConnection removes authority form a destroyed object, causing all kidns of errors. The call wasn't actually needed. (#1594)
* fix: #1593 - NetworkRoomManager.ServerChangeScene destroys the world player after replacing the connection, not before. previously ReplacePlayerForConnection would operate on dead data.

* remove it entirely
2020-03-24 22:28:04 +01:00
Paul Pacheco
9a50fbd507 Remove redundant initialization 2020-03-24 15:59:17 -05:00
Paul Pacheco
9fe718e8d5 playerName -> PlayerName 2020-03-24 15:59:17 -05:00
Paul Pacheco
72de733a62 remove redundant initialization 2020-03-24 15:59:17 -05:00
Paul Pacheco
1be3333905 Move ResolveMethod together 2020-03-24 15:59:17 -05:00
Paul Pacheco
25b13f83c2 CheckDLLPath -> CheckDllPath 2020-03-24 15:59:17 -05:00
Paul Pacheco
f74abc8f86 UnityEngineDLLDirectoryName -> UnityEngineDllDirectoryName 2020-03-24 15:59:17 -05:00
Paul Pacheco
e83daa8c5c drawSyncList -> DrawSyncList 2020-03-24 15:59:17 -05:00
MrGadget
c796116758
Remove Usage of LAN in HUD and Docs (#1592)
* Remove usage of LAN in HUD and docs

* Server + Client

* Host (Server + Client)

* HUD Image
2020-03-24 21:55:18 +01:00
Paul Pacheco
4c15fcf771 fix naming conventions 2020-03-24 15:25:54 -05:00
Paul Pacheco
6968234689 Reduce cognitive complexity of OnPostProcessScene
Fixes smell found by sonar qube
No code changes, just split into 2 functions
2020-03-24 15:20:42 -05:00
Paul Pacheco
e841aa9bf7 merge ifs 2020-03-24 15:10:32 -05:00
Paul Pacheco
9cc67938c3 remove redundant cast 2020-03-24 15:08:29 -05:00
Paul Pacheco
2d554d446e Reduce cognitive complexity of RebuildObservers
Identified as a smell by sonar qube
No logic changes, just refactor the code into a separate functions
2020-03-24 14:52:19 -05:00
Chris Langsenkamp
f084706bdf Scene meta update 2020-03-24 15:28:34 -04:00
Paul Pacheco
c69ae75d6a simplify parameter change 2020-03-24 13:47:10 -05:00
Paul Pacheco
aba028e74b Reduce cognitive complexity of NetworkRoomPlayer.OnGUI
fixes code smell in SQ, no behavior change,  just split the method into
smaller methods
2020-03-24 12:52:02 -05:00
Paul Pacheco
102a8822b0 fix smell discard unused parameter 2020-03-24 12:52:02 -05:00
James Frowen
b5a5a8f2f3
adding rule for methods (#1591) 2020-03-24 11:52:05 -05:00
Paul Pacheco
e8c9d7951d test that we cannot unpack the wrong message 2020-03-24 10:37:54 -05:00
Paul Pacheco
a7ab26fa7d Simplify tests 2020-03-24 08:31:19 -05:00
Paul Pacheco
4a9dca3c1c Simplify tests 2020-03-24 08:16:19 -05:00
Paul Pacheco
1362b80eb4 A test should only test one thing 2020-03-24 08:11:42 -05:00
Paul Pacheco
f6bb3a9f06 use Assert.Throws 2020-03-24 08:09:41 -05:00
Paul Pacheco
2714be3869 Remove unused using 2020-03-24 08:04:42 -05:00
Paul Pacheco
3321dd8a95 Move NSubstitute to common folder, It will be used in play mode tests 2020-03-24 08:03:22 -05:00
Paul Pacheco
19a17c15b9 MemoryTransport is only for tests 2020-03-24 08:01:39 -05:00
Chris Langsenkamp
733bb92d37 doc: Updated SyncVar Hook doc 2020-03-24 08:39:08 -04:00
Chris Langsenkamp
e88249b972 doc: Updated ChangeLog 2020-03-24 08:31:31 -04:00
vis2k
9e26b26689
NetworkIdentity.isServer simplified via one flag instead of helper variable + netId check. When isServer is set in OnStartServer, netId is set to != 0 in any case, so the previous check was unnecessary. (#1590)
* NetworkIdentity.isServer simplified via one flag instead of helper variable + netId check

* simplify teardowns

* NetworkIdentityTests can set isServer directly now

* networkbehaviourtests simplified

* NetworkServerTests can set isServer directly now

* remove comment
2020-03-24 11:25:04 +01:00
vis2k
9d088bc942
fix #1484: isServer state in NetworkIdentity is not dependent on NetworkServer.active anymore. Fixes a bug where isServer was already false in OnDestroy, but we sometimes still need it there to save a player etc. Also added a test to prevent it in the future. (#1585)
* fix #1484: revert isServer simplifiy. Fixes a bug where isServer was already false in OnDestroy, but we need sometimes still need it there to save skillbars etc.

* update comment
2020-03-24 11:07:40 +01:00
vis2k
2f87f3cca7 Runtime tests setup 2020-03-24 10:52:14 +01:00
FirstGearGames
505b26fd17
Added video tutorial link (#1586) 2020-03-23 17:40:59 +01:00
vis2k
1606f29a20 ProjectSettings resaved 2020-03-23 16:52:44 +01:00
Paul Pacheco
613356a6d0 fix smell, call parameter the same as base method 2020-03-23 10:29:45 -05:00
Paul Pacheco
0beba4dd2b fix smell, call parameter the same as base method 2020-03-23 10:28:49 -05:00
Paul Pacheco
f4a8692873 fix smell, keep parameter name in override 2020-03-23 10:27:51 -05:00
Paul Pacheco
bb655de71b fix smell keep overloaded methods together 2020-03-23 10:26:25 -05:00
Paul Pacheco
3a73a11a55 fix smell, use pascal case 2020-03-23 10:22:06 -05:00
Paul Pacheco
effb05e732 fix smells 2020-03-23 10:21:45 -05:00
James Frowen
cf55333a07
fix: overriden hooks are invoked (fixes #1581) (#1584)
* failing tests for virutal methods used by syncvar hook

* replacing Assert.fail to stop OnDeserialize failed error

* adding tests to make sure classes are set up correctly

* fix: call overriden hooks

Use a virtual call for hooks.  fixes #1581

Co-authored-by: Paul Pacheco <paulpach@gmail.com>
2020-03-23 14:06:24 +01:00
James Frowen
c7c3ee4ab9
Tests for SyncLists that use structs (#1583) 2020-03-22 17:05:50 -05:00