userDaniel Pcancel

2,251 Commits over 549 Days - 0.17cph!

11 Days Ago
Update: OcclusionGroupTest - add TestNew_ReconnectToASleeperFromSave test Catches a bug in how server occlusion handles this specific initialization path Tests: ran unit test, it fails
11 Days Ago
Merge: from useplayertasks_removegroupocludee_nre - Bugfix for NREs and errors when using -enable-new-server-occlusion-groups - Unit tests to cover parts of old logic and entirety of new logic behavior. 20 tests totaling 255 permutations. Tests: unit tests + 2p on craggy with noclip, teleportation, disconnect, killing sleepers and using OcclusionValidateGroups
11 Days Ago
Clean: Calrify in a comment what provisions does new logic can guarantee Tests: none, trivial change
11 Days Ago
Merge: from main Tests: none
11 Days Ago
Merge: from useplayertasks_removegroupocludee_nre Tests: unit tests + bunch of manual tests
11 Days Ago
Bugfix: OcclusionValidateGroups - fix a false positive by inverting a subscription check Was testing subscriptions from perspective of occlusion group participants, not the owner of the group (and the group tracks what the owner is subbed to) Tests: teleported away then spammed OcclusionValidateGroups - no more "stale participants" messages for a short second
11 Days Ago
Bugfix: OcclusionGroup - handle case when player reconnects and reclaims his sleeper - Added unit tests - Reconnect(4), KillSleeper(4), KillSleeperAndReconnect(8) and DieAndRespawn(4) Tests: unit tests + 2p on Craggy with p2 reconnecting near p1. used OcclusionValidateGroups (need a minor fix)
12 Days Ago
Update: adapt OcclusionValidateGroups to new logic Tests: used it in various scenarios in 2p on Craggy. Spotted a bug for reconnecting players, need to add a unit test and fix
12 Days Ago
Update: OcclusionGroupTests - added LaggyTeleport test Think I'm done, going to do a bit of manual testing and merge it back Tests: unit tests
12 Days Ago
Update: restore lastPlayerVisibility support in new logic - updated tests to validate corret removal of timestamp Just have one last test to implement, and it's done Tests: ran unit tests
12 Days Ago
Update: prep unit tests for lastPlayerVisibility validation Tests: ran unit tests
12 Days Ago
Update: OcclusionGroupTests now check if 2nd player in a test only references itself in the group Tests: ran unit tests
12 Days Ago
Clean: extract a bit of code to handle initialization Tests: ran all unit tests
12 Days Ago
Update: rewrite OcclusiongGroups logic to be simpler - updated unit tests with new expectations Each player now has their own occlusion group that they modify as they navigate network grid. OcclusionGroups are driven by network subscription logic. Got couple TODOs and couple unit tests to add, then done Tests: ran unit tests, all passed
12 Days Ago
Clean: reclaim occludees name Tests: compiles
12 Days Ago
Bugfix: OcclusionGroups - make subscribers leave occlusion group once player leaves it - add similar logic to subscribing to a cell This fixes the new unit test, but trips up the old (though I feel the asserts there might be wrong, need to double check). Will validate, but likely will rewrite new logic to be simpler. Tests: unit tests
15 Days Ago
Tests: OcclusionGroupTests - TestNew_MoveOther (8) Simulates other players going through observer's network range. Have a separate CL that makes this test pass, but not sure I like the final result - will try to rewrite it all through a different approach to be simpler. Tests: ran unit tests, they fail without extra changes
15 Days Ago
Clean: dead code removal Tests: none, trivial change
15 Days Ago
Bugfix: OcclusionGroup - handle sleeper edge cases - when player disconnects, clean itself up from non-local occlusion groups - when sleeper moves, unsubscribe from occlusion groups go out of range or don't have a local player Tests: unit tests, all pass (yay)
15 Days Ago
Update: OcclusionGroupTests - clear global Occludees hashset on every test start old logic leaks were polluting tests, making it more annoying to validate unit tests Tests: ran unit tests
15 Days Ago
Bugfix: OcclusionGroups - new logic will cleanup non-local groups from itself if there's no connected player there This fixes how 2 sleepers interact with each other, and lets us reduce the size of groups overall Tests: ran unit tests, 4/226 fail
15 Days Ago
Tests: OcclusionGroupTests - add validation that all groups have been cleaned up at the end of the test - some old logic based tests are failing this, so plugged it with a warning Tests: ran all unit tests, 8/226 fails
15 Days Ago
Tests: OcclusionGroupTest - disable assertions for known issues with old logic tests - Emitting "Skipping Assert for a known bug!" warnings for those instead Old occlusion grouping logic does not support moving sleepers at all. Also, seems to be failing to clean-up global occlusion groups tracking properly. Tests: ran all unit tests, 8/226 fail (only new logic that I've yet to fix)
15 Days Ago
Tests: OcclusionGroupTests - update expectations of all tests around newLogic and Asleep players This is currently catching a bug, so will need to fix later, after I sort the oldLogic failures next Tests: ran all unit tests, 22/226 failing
15 Days Ago
Bugfix: OcclusionGroupTests - hookup serverMgr to Network.Server - clarified expectatios for TestVisibilityNear, will need to do more of it for sleepers They were unlinked, sso player's weren't fully transitioning to the sleeper state (no subscriber, no connection), letting more tests pass than expected Tests: ran unit tests, 23/226 fails, old logic started to fail as well
15 Days Ago
Tests: OcclusionGroupTests - Asleep players are now disconnected-asleep (no subscriber, no connection) Tests: ran unit tests, this fails 11/226 cases, all on new logic side
15 Days Ago
Tests: OcclusionGroupTests - new TestVisibilityAfterMovingToOutside (32) All simple cases covered, except for using actual sleepers. Next change will likely break a bunch of tests Tests: ran unit tests
16 Days Ago
Tests: OcclusionGroupTests - add TestVisibilityAfterMovingToFarRange (32) - added a couple TODOs Tests: ran new unit tests, all's gud
16 Days Ago
Tests: OcclusionGroupTests - add move to near range visibility test (32) Tests: ran new tests, all pass
16 Days Ago
Tests: OcclusionGroupTests - add test validating moving from outside net range to same cell (32 tests) Need to add 2 more variations (move to near and far range), then can start moving to esoteric scenarios Tests: ran new tests, all pass
16 Days Ago
Bugfix: OcclusionGroupTests - fixup invalid expectation of newlogic groups in TestVisibilityAfterMovementAway We succesfully enforce newlogic's rule that networkable should always be in a local occlusion group Tests: ran all unit tests, all green
16 Days Ago
Bugfix: OcclusionGroup - prevent unsubbing from own group Can happen when player is dead/in limbo Tests: ran unit tests, fixed TestUpdateSubs(newLogic, dead), but TestVisibilityAfterMovementAway(newLogic, dead, *) still fail, albeit for new reason
16 Days Ago
Tests: OcclusionGroupTests - add simple tests verifying group and sub updates Need them to validate that new logic can unsub from group it's in (which is illegal) Tests: ran new 24 tests, TestUpdateSubs(true, dead) failed as expected
16 Days Ago
Bugfix: OcclusionGroupTests - fix TestVisibilityAfterMovementAway(oldLogic, Dead) tests Updating subs when in limbo unsubs you from limbo group (funky, but legal). Old logic ends up with empty groups (okay for it), but new logic ends up with an invalid occl group Tests: ran unit tests, 4 failures left
16 Days Ago
Bugfix: OcclusionGroupTests - fix TestVisibilityAfterMovementAway(*, OutsideCell) tests - Handle the fact that new occlusion group logic eagerly cleans up occlusion groups when moving out of range, even before subscription tick - Fix invalid assertion for old logic when p2 moves, before subscription tick Tests: ran tests, now 8 failing (all related to Dead players)
16 Days Ago
Tests: OcclusionGroupTests - add TestVisibilityAfterMovementAway tests (32) Tests: ran new unit tests, 14 fail
16 Days Ago
Tests: OcclusionGroupTests - Visibility tests now update network groups and update subscriptions This validates that subscription mechanism works on a basic level Tests: all 42 unit tests pass
16 Days Ago
Bugfix: OcclusionGroupTests - use AreEquivalent instead of AreEqual when comparing occlusion groups Old logic and new logic end up with differently ordered occlusion groups - but in real world we don't care about order Tests: all 42 unit tests pass
16 Days Ago
Bugfix: Eagerly initialize occlusion groups when player spawns When player's network group switches on spawn, it's treated as a bot, so doesn't create an occlusion group, but it might be awhile till next group switch, so player might have uninitialized occlusion group for a bit. Tests: unit tests - 42/45 pass
16 Days Ago
Bugfix: OcclusionGroupTests - handle dead players in limbo All TestVisibility* tests pass for old logic Tests: ran unit tests
16 Days Ago
Bugfix: OcclusionGroupTests - use RespawnAt to be put in the right position for RespawnFromDead players This makes 3 unit tests pass Tests: ran unit tests
16 Days Ago
Bugfix: PlayerInventory - make GiveDefaultItems safe, report errors instead of NREing - GameManager.InUnitTest is now available outside of UNITY_EDITOR as always-false const Tests: more unit tests related to RespawnFromDead pass
16 Days Ago
Update: OcclusionGroupTests - introduce another player spawn state, RespawnFromDead - setup default itemList for ItemManager when running unit tests, as it's assumed to always be there Another assumption that I had proved wrong - when players are spawned, they can stay dead (for example, game mode can prohibit spawning for a time) Tests: ran unit tests, more borkage
16 Days Ago
Bugfix: OcclusionGroupTests - setup valid world bounds for unit tests - added netgroup visibility precondition testing, if that fails, then the test setup is wrong Empty bounds were causing group layers to sometimes become TutorialIsland, which break visibility Tests: ran unit tests, more pass
16 Days Ago
Bugfix: OcclusionGroupTests - correct expectations of visibility Tests: ran unit tests, more pass, but still mostly borked
16 Days Ago
Tests: OcclusionGroupTests - add players that spawn as sleepers or dead I assumed newly connected players always spawn as sleepers, but that's wrong - could explain an active NRE. Tests: ran unit tests (most still borked)
17 Days Ago
Tests: add basic OcclusionGroup tests - covers both old and new logic Tests: ran unit tests, most fail, only trivial passes. Will resolve tomorrow.
17 Days Ago
Merge: from useplayertasks_removegroupocludee_nre - Update: hide new server occlusion group logic behind -enable-new-server-occlusion-groups command line arg (disabled by default) Tests: 2p on Craggy - moved, teleported, reconnected, checked server occlusion still works
17 Days Ago
Update: merge old OcclusionGroup code and put it behind DisableNewOcclusionGroups switch - make DisableNewOcclusionGroups true by default, can be turned off with -enable-new-server-occlusion-groups command line arg Tests: 2p on Craggy - moved, teleported, reconnected, checked server occlusion still works
17 Days Ago
Update: declare a boot time switch to disable new server occlusion groups Need to bring back old logic for it, that'll be next. Tests: none, trivial change