All Rust commits from Facepunch
Update: extract how we gather network group subscribers into a ISubscriberStrategy - implemented a DefaultSubscriberStrategy This CL doesn't have any logic change, it just reorganizes code so that we can start overwriting this(need it for spectating now and parallel processing in the future). Tests: 2p on craggy - saw the island entities spawn in as well as the players replicate
Bugfix: spectators now subscribe to spectatees via secondary group This prevents spectatee from being culled out by network grid onthe spectators end, leading to NREs. This is temporary solution, as it doesn't have the same network range as the primary group. Tests: spectating a palyer on craggy, then flew around till the island was no longer visible
▋▇▅▋▍: ▅▍▌'▍ ▅▌▇ ▋▇ ▄▄█▉▅ ▌▍▌▇▌▅██▄▌▋▅▆▇▅▇▊▌▍▅▋█ █▆ ▌▄██▆▄▌▌▉▍ ▅▌ ▌▍▆▊▉▊▍▍▆▍ ▊▄▊ ▍▇ ▆████▉ ▊▉▋▊▍▆▄▄ ▌▊ ▆▅▇█▋▉▇▉▄█, █▄ ▌██▌▆'▊ ▊▇▅▉ ▋▇▆█▉▍▉ █▍▍ ▇▇▇▌▇ ▉▊▊ ▅▌▇▍▄'▊ ▊▆▆▄▄▇▇ ▉▉▋█▄▆▆ ▄▇▍▊█ █▊█▅▉▉▋, ▍▍▆▆▅▋ ▆▊▋ ▆▋▉█▊ ▉▌▌▊ █▆▆█▊: ▌▌▋▉ ▉▍▆▅▊ ▉▆██▇▆▉ ▊▋ ▊ █▌ ▊█▅▌▌▌▊ █▅▆█ ▉▇▇██▆▋▊▉▄ - ▄▍▅▅'▅ █▊▅ ▌▉▊ ▍▋▅▇▉▊▊.
▋▋▋▇▄: █▄▌'▊ █▇▌ █▇ ▊▋▊▇ ▅▄▋▇▄▅▍▅▋▋▆▅█▊▉▅▊▉▅▊▋▊▌▍▄ ▊▄▋ ▋▆▌▉▊▊▉▋█▇ ▋▉█▍▊▇▉ ▉ ▍▊▆▆▊ ▄▊▄▉ ▉▅▌ ▇█ ▅▆ ▇▉▍▋ ▉▋▅▋▊▇▌▉▅▌ ▍▉▇▉▊▇██▉▋ ▍▊▅▄▉▊▄ ▇█▅▉▅ ▇▌ ▄▆█▉▊▇▆▄▌▊ (▉▊ █▋▋ ▋▌ ▌▄▆▋▍ ▊▅▅▄ ▆▉ ▅▄▆▌▆▉██▍). ▍▌▆ ▉▍ ▋█ █▍▅▆▉▊ ▇▋▄▅▄▅ ▉▇▇▉▄▊▌▋▇▋ █▍ ▇▇▌▌▍▋▊▌▅▆, ▋▆ ▌▄▄ █▊▉▋▄ █▆▌▉▊▆ ▆▌▄▍. ▄▋▉▆▌: ▅▌█▋ ▇█▅▄▇ ▊▄▋▍▊█▅ ▌▍ ▇█▅▉▆▆▊ ▉▋▌▅ ▅▍▊▉ ▅▍▉▅ ▋█▉▇▅ - ▉▍ ▉▉▆▆▉▌▆▋▆▌ ▋▊▊▅▄. ▌▋▆ ▍▅▊█▅▋▊▌ ▄▄▉▋ ▅▍▍▆▋▅▆█▇ ▆▍▅█ ▋█▇▍▍▊▉▌▄ ▆█ ▇▄▇▉▉▋▌▅▆█ ▋▌▊ ▇█▍ ▊▆ ▍▊▆█▍█▇ ▇▌▄█▍ ▍▄▋▉▍▊ - ▋▋▌▊ █▌▍ ▄▍▊▊ ▊▉ ▋ ▍▉▄
Optim: cache spectated target Turns out it's quieried very frequenly Tests: 2p session on craggy with disconnects
Update: first version of spectate that doesn't require parenting to target player Doing this to avoid weird bugs with nested players in other systems. Tests: 2p session on craggy with spectating. Toggled camera modes and toggled invis. tried spectating after server occlusion culled other player. Noticed that nutrition, comfort info didn't replicate, map compas reacted to spectator's input - will fix those next
Bugfix: fix invis players not replicating positions & rotations Tests: spectated invis player, didn't observe and animation glitches as the comment warned (tried rock, torch, ak)
Bugfix: don't destroy local player when spectating player going invisible Fallout from the recent rewrite. Tests: while being spectated, toggled invis a bunch of times - no NREs on the client. invis player doesn't replicate, though, will fix next.
▉█▊▋▊▋: █▍▌▇▇▊▋▉▇▆▋ ▋█▅▍▅.▋▅█▊▄ ▆▉▋▆▊█▌ - ▊▉▄▅▍▍█ ▌▉▍▌▊▊▍▇▍▇.█▊▅▉█▋▉▆▍▋▅█▄▄▋ ▅▌▌▌▆ ▉▋ ▉▊▅▊▋▇▌▄▅ - ▌▊█▌ ▄▇▆▆▌▉▌▄ ▆ ▆██▌ ▅█▌▄▉ ▋▋▋▅██▌▍▅█ ▍▉▆▌▉▆▋▌▉ ▊▄ ▊▊▋▆█ ▊▅▌▅▇▅▅▇▍▋ ▅▍ ▌▋█▌▇█ ▄▊▍▊▌▊█ ▊▆ █▉▄▄▍▌▄▌▊▅▍▅▋█▍, ▍▌ ▅▌ ▄▋▅ ▅▇▆▊▊█▄ ▆▆ ▋▊▍▊▋▌▊▅▄▋ ▍▋▋▇▆▆▆▍ ▊▄█▊▊ █▆▇▊▋ <-> ▆▆▉▋█▌▆ ▉▌▋▆ ▄▅▍▋ ▆▋██▍. ▄███▇▆▋, ▅▄█ ██▅▍▌▌ ▆▆ ▇▌▅▋██▋▊▌█▌ █▊▌▌▋: ▊▌▋▄▇ ▅▄ ▄█▇▇▌▌▆ ▅▌ ▄▉▄▊▌▇▄▍▋▋, ▇▆▆▊▌▊▉█▆ ▄▄▅▌▅, ▋▅▆▄▄ ▍▋▉▇▄▇, ▅▋▆▌▇▌▌▇ ▊▋▋▋▌, ▉▋▆▇▄▅▋▍ ▊▍▌▋▅ - ▍▌▋▍▌▍▆▆▋▌ ▆▊▌▅ ▆▋▆ ▇▍█▇▉ ▇▊ █▉▆ ▇██▌█ ▅▅▌▍. ▉▋▍▌█▊▋▌▄▋ ▅▍ █▅█▉▌▇, ▌█▉ ▅▉ ▆ ▊▍▋▇ ▍▌█ - ▋▆▇▅█▇▅▍ ▊▋█▊▊█▇ ▌▇▍▆ ▉▌ ▇█ ██▆▋/▅▉▌█▌▅▆, █▊ ▅▍▍ ▆ ▋█▅ ▊▄▉▌▌▇▄█▇▋▇.
Bugfix: remove false-positive log for deferred player destroy - remove unnecessary override Discovered when spactating a player that constantly toggles invis. Doesn't fix the NRE itself, but further reduces false-positives. Still looking for the root cause Tests: spectated a player constantly toggling invis
Bugfix: reduce error false-positives by ensuring bot IDs never overlap - Permit random overlap once we exhaust MaxBotIdRange ids (which is old behavior) but emit an error Because we always picked a random bot ID, it was possible that there'd be an overlap and it could confuse dependent systems (like my logging for the NRE). Hoping this reduces false-positive error logging. Tests: in editor spawned a couple players and killed them, then monitored the ID queue with debugger
Merge: from main
Merge: from main Didn't refresh and missed the desired fixes
Merge: from main
Merge: from main
Update: move breadcrumbs a bit to get better callstack - eliminated a false-positive Tests: built standalone and connected to staging - no more error logs on connect to server
Merge: from main
Update: convert error logs to error-once logs The current changes mitigate the problem, which will allow peeps to play longer while we chase up what's going wrong. Tests: none, trivial change
Update: adding more logging in an attempt to catch baseplayer NREs Tests: 2p local session with spectating, disconnects
Clean: remove hacky testing code changes Tests: editor compiles
Bugfix: potentially fix BasePlayer Vis NRE - Added extra logs to catch other sources - Refactored code to extract invariant checks Not confident it'll actually solve it, if it does - can remove extra logs Tests: using spec_loop command to force client to quickly spectate-then-stop in a loop. Tried both in editor and standalone builds - no issues(though I couldn't repro it originally this way anyway)
Merge: from main
Update: testing code to try to trigger NREs. so far unsuccessful Need to switch away from the task for a bit, will get back to it later today Tests: 2p session, used spectate_loop to see what happens on 2nd player end - no NREs