incomming #9

Open
DL2x wants to merge 23 commits from incomming into oculus-compat
Owner
No description provided.
DL2x added 10 commits 2026-07-13 10:01:32 +02:00
Pre-size `itemBaseToNetworkedItem` with a capacity of 4096 to reduce dictionary reallocations, and change `GetAll()` to return the dictionary `ValueCollection` directly instead of allocating a filtered list. This cuts per-call allocations and improves access performance for cached networked items.
Preallocate common collections in `NetworkedItemManager`, reduce a few allocations, and quiet noisy debug logging. Also switch the item cache error path to error-level logging so failures are more visible.
Delay host initialization for networked junctions and turntables until Start when the server may not be running during Awake, while still handling already-running servers. Also prevent duplicate ID components with DisallowMultipleComponent and switch the turntable patch to GetOrAddComponent to avoid adding duplicate NetworkedTurntable instances.
Adds a new `FastTravelAdvancesTime` gameplay setting and propagates it from server to clients via `ClientboundGameParamsPacket`.
Use `pwsh` instead of `powershell` on non-Windows platforms, with forward-slash paths and `ContinueOnError=true` to handle missing PowerShell gracefully.
Prevent clients and host (when other players are connected) from fast travelling with loco. This can be re-enabled once fast travel has been:
1. Made server authoritative
2. Can teleport locos safely, without causing de-syncs (refer to Work Trains code for a possible method)
Adds a Harmony postfix patch on SaveLoadController.RefreshInterface to disable the load save button when not in the main menu, preventing a softlock that occurs when loading a save game mid-session.
Add a server-side flag for whether fast travel should advance time, and import the world patch namespace needed to support that behavior.
commit e36d6044d390e4273ca2c0882f40b55cc7a34f8e
Author: Macka <andrew@andrewcraigmackenzie.com>
Date:   Sun Jul 12 19:09:51 2026 +1000

    Refactor player position sync and add VR tracking

    Replaced per-field position packets with a `PlayerTrackingData` payload that serializes only changed tracking fields, and wired it through client/server packet handling and player state storage.

    Local player tracking was consolidated into a shared base flow with non-VR/VR-specific hooks, including VR hand pose deltas and controller re-init logic.

    Added a `NetworkedPlayerIKHandler` and enabled IK pass in the locomotion animator so remote VR hand targets can drive avatar IK.

    Enabled IK pass in the locomotion controller to allow IK data to be used.

commit 9a4031c61332f9f211445c457293341a31008b49
Author: Macka <andrew@andrewcraigmackenzie.com>
Date:   Sun Jul 12 19:05:25 2026 +1000

    Collect VR flag at player login

    Add an `IsVR` field across the login and player-join flow so VR state is sent by clients, stored on `ServerPlayer`, and broadcast to other clients. Client-side player creation now receives and stores this flag on `NetworkedPlayer` for downstream VR-specific behavior.

commit b9d1cedd0c891bfe488d34e01236d62510332b0c
Author: Macka <andrew@andrewcraigmackenzie.com>
Date:   Sun Jul 12 19:03:05 2026 +1000

    Move PlayerPreference to Player namespace

    Relocated `PlayerPreference` to `Networking/Data/Player` and changed its namespace to `Multiplayer.Networking.Data.Player` to better group player-specific data. Updated all affected references/usings in server/client managers and preference packet classes to match the new location.

commit 56b0e7b02b7677ba3e82931978f1ad8d978ba7d4
Author: Macka <andrew@andrewcraigmackenzie.com>
Date:   Sun Jul 12 06:48:11 2026 +1000

    Refactor CustomFirspersonControllerPatch

    Create a LocalPlayerTrackerNonVR and LocalPlayerTrackerVR class to replace CustomFirstpersonControllerPatch functionality.

commit 801bfa1a5c39d97aea675c61a9ffdebec89eb623
Author: Macka <andrew@andrewcraigmackenzie.com>
Date:   Sat Jul 11 21:37:53 2026 +1000

    Add Sit Logic

    Adds sit animations, updates the locomotion controller and animation handler and implements transmission of sit height

commit 92c3009d5c86de62a93659dc629de5df853f31d0
Author: Macka <andrew@andrewcraigmackenzie.com>
Date:   Sat Jul 11 13:37:41 2026 +1000

    Add Lean poses

commit 8717f1ffce174626d5f1cc256cd08cbb72b1b9b6
Author: Macka <andrew@andrewcraigmackenzie.com>
Date:   Sat Jul 11 13:18:53 2026 +1000

    Fix debug logs

commit a8aa027f80e15d5834cf77f8bb574c49a28d7fea
Author: Macka <andrew@andrewcraigmackenzie.com>
Date:   Tue Jul 7 19:40:49 2026 +1000

    Send player posture

    Replace the old packed jump/car bitfield with explicit posture flags and a separate on-car field.

commit 39eba9bb664534e0845fe888c2c7c87743b0e7e8
Author: Macka <andrew@andrewcraigmackenzie.com>
Date:   Tue Jul 7 17:54:17 2026 +1000

    Fix foot offset in sit and crouch pose

commit f1de4c66a516bc1b5acb95eb83d16aa7501b89fd
Author: AMacro <andrew@andrewcraigmackenzie.com>
Date:   Sat May 10 14:40:02 2025 +1000

    Continue work on Locomotions Controller

commit 0af88f0cd389513cad9759bd7ae2cd921ca7ca28
Author: AMacro <andrew@andrewcraigmackenzie.com>
Date:   Mon May 5 12:28:04 2025 +1000

    Tidied up animations

commit c5bc16be758b365e1fdbdd7ab6f6c22d8a6d9eb0
Author: AMacro <andrew@andrewcraigmackenzie.com>
Date:   Mon May 5 12:17:30 2025 +1000

    Added swimming and fixed crouch walk

commit 5694197aa0c2309d71cd2b975394868f450fd133
Author: AMacro <andrew@andrewcraigmackenzie.com>
Date:   Mon May 5 11:24:36 2025 +1000

    Crouch walk working

commit 9f5f54786cf092354bcaaedef2b7bddb7a679245
Author: AMacro <andrew@andrewcraigmackenzie.com>
Date:   Mon May 5 09:49:29 2025 +1000

    Fix easing poses

commit cf869236d7906d40eca1320f9b5025d39833413a
Author: AMacro <andrew@andrewcraigmackenzie.com>
Date:   Mon May 5 00:26:49 2025 +1000

    Add crouch and sit poses

commit 72aa965e859d3190f3638ffaf40c02ebf1bee708
Author: Macka <andrew@andrewcraigmackenzie.com>
Date:   Tue Jul 7 12:53:52 2026 +1000

    Improve player head tracking

    Switch networked player head tracking to the animated head bone instead of a fixed child lookup.

    Update local player head tracking to work with VR

commit 9189e8856d4f101823033f82de17f5ba8cc0b973
Author: Macka <andrew@andrewcraigmackenzie.com>
Date:   Sat Jun 6 21:12:00 2026 +1000

    Add handling for nonVR player head and item pitch

commit d6af0b1a1255da1f8560f0809ef46d8f0ead3d9a
Author: Macka <andrew@andrewcraigmackenzie.com>
Date:   Sun Jul 5 20:47:43 2026 +1000

    Fix preview camera and VR model rotation

    Moves `ModelRotator` into the UI settings namespace and extends drag handling for both flat and VR pointer workflows.

    Updates character preview camera setup/lifecycle (render texture descriptor, enable/disable timing, and cleanup)

    Makes `PlayerModelRegistry` reloadable - returning to main menu causes assets to be unloaded and prefabs become null.

commit 3232b98f7bddd3e10a5de81c87f2bedf649785de
Author: Macka <andrew@andrewcraigmackenzie.com>
Date:   Sun Jul 5 20:09:37 2026 +1000

    Split tooltips for character selector

commit c028e8365541baa8af9d674b60d23482b756aab3
Author: Macka <andrew@andrewcraigmackenzie.com>
Date:   Sat Jul 4 19:24:45 2026 +1000

    Update localisation strings

commit 8b25ab3690f87902586a1e8f2dd301e80618bad0
Author: Macka <andrew@andrewcraigmackenzie.com>
Date:   Sun Jun 28 21:04:37 2026 +1000

    Update models

    Fix prefab naming convention and create a new model for a Tic Tac for nostalgia with Patrick van Halm's original DV MP mod

commit 88c61c3a4b8f389aa805f24f9ce3037775729481
Author: Macka <andrew@andrewcraigmackenzie.com>
Date:   Sun Jun 28 21:01:40 2026 +1000

    Add support for players choosing a character model

    Allow players to choose and change character models as desired

commit 25e2448f739040f0ebf11f1e3c7f7d26403ff831
Author: Macka <andrew@andrewcraigmackenzie.com>
Date:   Sun Jun 28 20:34:34 2026 +1000

    Add player model registry and fallback logic

    Create a centralised player model registry for future support of custom models.

commit 8861fc7868b68ae6e1b88b21653fc6b87c22b76c
Author: Macka <andrew@andrewcraigmackenzie.com>
Date:   Sat Jun 27 23:17:02 2026 +1000

    Add key bind UI for chat key setting

    Implements a KeyBindInterface singleton that shows a fullscreen overlay and captures keyboard input with a countdown timeout. Wires it into the multiplayer settings menu so users can rebind the chat key. Also adds a locale key for the overlay text and excludes Escape/SysReq from valid key bind targets.

commit b6245a42a16a0c9e27673bac451d4afa45d91fbd
Author: Macka <andrew@andrewcraigmackenzie.com>
Date:   Sat Jun 27 23:07:49 2026 +1000

    Fix character selector settings sync

    Align the character selector with saved settings, keep Apply state in sync with the selected character, and preserve the menu state when returning from discard/apply. Also removes stale selector cleanup and debug code now covered by the new flow.

commit a280a344543c4174e744efc5eb11c390a571b37d
Author: Macka <andrew@andrewcraigmackenzie.com>
Date:   Sat Jun 27 23:07:07 2026 +1000

    Reorganise server browser UI components

    Move server browser and grid view classes into dedicated UI namespaces and folders

commit a32213967844cc2a320d44328797efef3ae706ab
Author: Macka <andrew@andrewcraigmackenzie.com>
Date:   Sat Jun 27 17:51:03 2026 +1000

    Refactor the spawning of UI Controls

commit 7d082864f5271f80fa1ff1ae4f7f79d13e67b0d7
Author: Macka <andrew@andrewcraigmackenzie.com>
Date:   Tue Jun 23 23:02:34 2026 +1000

    Improve character selector UI and settings

    Refactor and enhance the multiplayer character selector and settings UI:

    - CharacterSelectorMenu: resize preview render target (512->435), adjust layout padding/alignment, extract BuildCharacterSelector, rename vars to previewModel/selectedIndex, add OnEnable/OnDisable to wire BottomButtons and Apply/Discard handlers, add SettingsChanged stub, add tooltips, and stubbed Apply/Discard methods. Also tweak preview camera, anchors, and model handling (ensure animators/springs/blinkers handled for unscaled time).
    - SettingsControllerPatch: create separate Multiplayer and Character panes, add MultiplayerSettingsMenu component, wire menu indices and bottom buttons, create CreateBottomButtons helper, move left menu into a ScrollView (MoveMenuToScrollView) to avoid overflow/VR issues, and replace some Object.Destroy calls with GameObject.Destroy. Add rich UI debugging helpers (LogUIHierarchy, AppendUINode, AppendComponentInfo).
    - Settings: add CharacterId property to persist selected character.

    These changes improve layout/preview behavior, add Apply/Discard button wiring, make the character selector accessible from multiplayer settings, and provide utilities for inspecting UI hierarchies.

commit e79643e6f588405087bea8cda63ccf198a03f41a
Author: Macka <andrew@andrewcraigmackenzie.com>
Date:   Tue Jun 23 23:01:02 2026 +1000

    Create Multiplayer Settings Menu

    Base menu, requires code to manage settings

commit f4b5b4b98a453a454494df38742ecdd6383c542b
Author: Macka <andrew@andrewcraigmackenzie.com>
Date:   Sun Jun 21 00:55:08 2026 +1000

    Client: instantiate player model and name tag

    Refactor client-side player creation and NetworkedPlayer to support dynamic models.

    - NetworkedPlayer: add a playerModel field, expose ChangeModel(GameObject) to instantiate/destroy models, derive animationHandler from the instantiated model, use null-conditional calls for nameTag updates, and use transform via a property instead of caching selfTransform.
    - ClientPlayerManager: replace single prefab with a player tag prefab and an array of player prefabs; create a parent GameObject for each player, instantiate the name tag as a child, attach NetworkedPlayer, and call ChangeModel to set the visual model. AddPlayer signature now accepts a prefabId (currently passed as empty string).
    - NetworkClient: forward the prefabId argument (as empty string for now) when handling player-joined packets.
    - Minor whitespace tweak in Multiplayer.cs.

    These changes prepare the client codebase for multiple player models and decouple the visible model from the NetworkedPlayer component.

commit f0ed0af54ba6e1a082ae138c77913ddd280f7725
Author: Macka <andrew@andrewcraigmackenzie.com>
Date:   Sun Jun 21 00:53:23 2026 +1000

    Add character selector UI and settings pane

    Introduce an in-settings character selector and preview system.

    - Add CharacterSelectorMenu (Multiplayer/Components/MainMenu) to build a UI panel with a RenderTexture preview, preview camera/light, and populate selectable character list from AssetIndex. Ensures animations run in unscaled time and sets item layers for isolated rendering.
    - Add ModelRotator to allow pointer drag rotation with inertia for the preview model.
    - Patch SettingsController to inject a new "Multiplayer" settings pane by cloning the Gameplay pane, add the character selector component, wire up the menu button, localization key, and icon.
    - Add settings locale keys in Locale.cs and update locale.csv with settings/char_select entries and tooltips.
    - Minor cleanup in RightPaneControllerPatch usings.

    This enables players to preview and pick cosmetic characters from the settings menu.

commit d36ddf8034100a226336c8eb68e991207c3d03fa
Author: Macka <andrew@andrewcraigmackenzie.com>
Date:   Sun Jun 21 00:51:29 2026 +1000

    Update models

    Add blink and hair animations as well as an model metadata system

commit 65e1de1c390aa01f087a4ef06ed6130193f26b23
Author: Macka <andrew@andrewcraigmackenzie.com>
Date:   Fri Jun 19 17:33:32 2026 +1000

    Create & Rig New Player Models
Reworked player-in-car tracking to use explicit server/client occupancy sets on `NetworkedTrainCar` and updated player/car transitions to add and remove players reliably. `NetworkServer` now updates car membership when `CarID` changes, and `NetworkedPlayer` now tracks occupied networked cars and notifies car state changes.

`HasPlayers` was replaced with a method using the new tracking, and all delete/rerail checks were updated to call it. `CarVisitChecker.OnPlayerCarChanged()` patched to utilise the `HasPlayers()` method to track if any player is on the vehicle.
Implement InUse() check on NetworkedTrainCar.
Rework Work Train spawn requests to use NetworkedTrainCars.InUse.
Clear the recently visited flag on Work Trains cleared by the comms radio
Introduce an inventory root and explicit right/left hand item tracking for NetworkedPlayer. Adds AddItemToInventory, expanded HoldItem (now sets parent, disables GrabHandlerItem physics/interaction, and disables colliders while recording them), and DropItem (re-enables colliders, restores GrabHandlerItem, reparents to OriginShiftParent). Replaces the old itemHeld field with RightHandItemGO, adds lists to track disabled colliders, and creates an inventory GameObject in Awake.

TODO: extend support for left-hand and dual-hand items.
* Improve tracking of players on TrainCars

Reworked player-in-car tracking to use explicit server/client occupancy sets on `NetworkedTrainCar` and updated player/car transitions to add and remove players reliably. `NetworkServer` now updates car membership when `CarID` changes, and `NetworkedPlayer` now tracks occupied networked cars and notifies car state changes.

`HasPlayers` was replaced with a method using the new tracking, and all delete/rerail checks were updated to call it. `CarVisitChecker.OnPlayerCarChanged()` patched to utilise the `HasPlayers()` method to track if any player is on the vehicle.

* Rework Work Train in use checks

Implement InUse() check on NetworkedTrainCar.
Rework Work Train spawn requests to use NetworkedTrainCars.InUse.
Clear the recently visited flag on Work Trains cleared by the comms radio
Default raycaster uses 2 metres, to help with lag/minor desync increase this limit to 3 metres and increase the tolerance to 10% compared to the original 5% (effectively 3.15 metres)
* Add player inventory & right-hand item handling

Introduce an inventory root and explicit right/left hand item tracking for NetworkedPlayer. Adds AddItemToInventory, expanded HoldItem (now sets parent, disables GrabHandlerItem physics/interaction, and disables colliders while recording them), and DropItem (re-enables colliders, restores GrabHandlerItem, reparents to OriginShiftParent). Replaces the old itemHeld field with RightHandItemGO, adds lists to track disabled colliders, and creates an inventory GameObject in Awake.

TODO: extend support for left-hand and dual-hand items.

* Increase pluggable object insertion distance

Default raycaster uses 2 metres, to help with lag/minor desync increase this limit to 3 metres and increase the tolerance to 10% compared to the original 5% (effectively 3.15 metres)
Password popup now uses the existing PopupTextInputFieldController with allowEmpty enabled, removingthe need for the custom no-validation controller component.
* Use built-in text input popup

Password popup now uses the existing PopupTextInputFieldController with allowEmpty enabled, removingthe need for the custom no-validation controller component.
Clean up warning logs.

Add null guards for missing overviews and booklets.
Refactor Job Validation
This pull request has changes conflicting with the target branch.
  • Multiplayer/Locale.cs
  • Multiplayer/Multiplayer.csproj
  • info.json
  • releases.json
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin incomming:incomming
git switch incomming

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch oculus-compat
git merge --no-ff incomming
git switch incomming
git rebase oculus-compat
git switch oculus-compat
git merge --ff-only incomming
git switch incomming
git rebase oculus-compat
git switch oculus-compat
git merge --no-ff incomming
git switch oculus-compat
git merge --squash incomming
git switch oculus-compat
git merge --ff-only incomming
git switch oculus-compat
git merge incomming
git push origin oculus-compat
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DL2x/dv-multiplayer!9
No description provided.