Repository navigation
Update Space Engineers VR to 2.0.4 - #376
Conversation
|
Updated to 2.0.2 and updated the description. |
|
Updated to 2.0.3 and updated the description. |
|
Updated to 2.0.4 and updated the description. |
viktor-ferenczi
left a comment
There was a problem hiding this comment.
Review: Space Engineers VR 2.0.4
Scope: hub PR head 5f12d1e923b73e545775c73146065dbbc7a12bce, manifest Plugins/SpaceEngineersVRPlugin.xml. Version bump 58d63d1..148efd6 (v1.6.1 to v2.0.4): 35 commits, 155 files, +5565/−676. 94 files (+3426/−531) reach the hub build. 30 are Diagnostics/ files, all wrapped in #if SEVR_DIAGNOSTICS, which only the repository's own project file defines. The rest are guide images, docs moved to guides/, dev scripts, the diagnostics tool and the Multiplayer assembly's version. Your comments say the PR moved through 2.0.2 and 2.0.3 to 2.0.4; this review covers the whole range from the merged 1.6.1 pin to the 2.0.4 pin, so the interim versions are included.
Summary: No agent-detected blockers. Two low findings. With SmoothFrames installed, the first third-person view after each world load writes a new trace CSV into the root of the game's user data folder, and nothing ever removes them. A failure in the SmoothFrames bridge also leaves SmoothFrames' interpolation off after VR stops. The new WindowsOpenVR asset is Valve's openvr_api.dll 1.16.8, byte for byte, and the same file OVRSharp already ships. Handheld target locking keeps the game's range and cone checks. There is no new network traffic, process start or assembly loading.
Manifest and pin
- Hub validator (
python3 test.py Plugins/at the PR head):All files validated. CIxml-checkpassed. - The PR changes
<Commit>and adds theWindowsOpenVRasset.SourceDirectories, the NuGet packages, platforms, runtimes and the other assets are unchanged. 148efd6is taggedv2.0.4(release published 2026-11-18) and is the currentmainHEAD. The repository is public, GPL-2.0.- No project file, package reference or committed binary changed in the hub-built tree.
- The repository's own
SpaceEngineersVR.xmldoesn't have theWindowsOpenVRasset yet. The hub manifest wins, so this is only drift.
The WindowsOpenVR asset
openvr_api.dllfromValveSoftware/openvrtagv1.16.8(commit4c85abc),bin/win64: 818,904 bytes, SHA-256c3314d88…c6cee744f, PE32+ x64, FileVersion 1.16.8. That matches the manifestSha256.- It is the same file as
content/openvr_api.dllin the OVRSharp 1.2.0 package. The package marks itcopyToOutput="true", so Pulsar v2.4.3 already copies it into the plugin's Bin folder (NuGetRestore.GetRuntimeFiles,GitHubPluginL183-L188). The asset is resolved after that andFile.Createoverwrites the copy with identical bytes, after the hash check. Harmless. See the note below.
Security
- Process and environment.
Main.SteamVrRunningonly listsvrserverprocesses and disposes them. Under Proton, whenPROTON_VR_RUNTIMEis set, it callsOpenVR.Initas aVRApplication_Backgroundapp, which doesn't start SteamVR, then shuts it down. Nothing is started or written. - Files. The only new write is the SmoothFrames trace (finding below).
- Reflection and IL. The SmoothFrames bridge reflects over fixed member names in
SmoothFrames.*and the renderer.DlssParts.VoxelLodSizeemits aDynamicMethodthat reads one fixed field. No type or member name comes from config, network or game data. - The NGX binding and native loading are unchanged apart from comments.
Dlss.Prepareon the loading screen returns early when DLSS is off, so NGX still starts only after the player picks a DLSS mode. - No new network channel, packet handler, process start, assembly loading or deserialization. The only new environment variable read outside
SEVR_DIAGNOSTICScode isPROTON_VR_RUNTIME.
From-source build
I built SpaceEngineersVR/**/*.cs with C# 14 in Release against the installed game Bin64 (Steam build 26329893), Harmony 2.4.2, Mono.Cecil 0.11.6 and the two hub packages. The build used an MSBuild harness, not the repository's project file:
| Symbols | Errors | Compiler warnings |
|---|---|---|
net48, TRACE;NETFRAMEWORK;PULSAR |
0 | 0 |
.NET 10, TRACE;NETCOREAPP;PULSAR |
0 | SYSLIB0050 |
.NET 10, TRACE;NETCOREAPP;LINUX;PULSAR |
0 | SYSLIB0050, CS0649 (same as 1.6.1) |
The game members that the new patches and reflection look up by name exist in game 1.211.017 decompiled code. These include MyRenderScheduler.Done, MyBlockBuilderRenderData.EndCollectingInstanceData(…, bool useTransparency), MyProjectorBase.SetTransparency, MyFlareOcclusionRenderer.Get, MyRender11.ProcessMessageInternal/ProcessMessageQueue(bool), ActorExtensions.GetSkinning, MySkinningComponent.SetAnimationBones, the MyHudEmpDistortion fields and the in Vector3D from, in Vector3D to signature of MyCharacterRaycastDetectorComponent.ProcessUseObjects. SetSamplers lives on MyCommonStage, which AccessTools finds through the base type.
Compatibility and authority
- Handheld target locking.
HeldTargetingPatchswaps the oneGetHeadMatrixcall inMyTargetLockingComponent.CanTargetfor the held weapon's sight pose. The vanilla check that runs on the server is onlyIsTargetInRange(range and cone). The head direction it replaces is client-controlled in vanilla too. The weapon pose has to stay within 1.5 m of the head (HeldItemPose.TryGet), so the range moves by at most a couple of meters. On a dedicated server without the plugin, the vanilla head check stays. - Relative dampeners.
DampenerRequests.Allowednow also checks the game'sIsDampeningToGridDenied, which makes the server-side validation stricter. - Hand interaction, blueprints and HUD. The detector ray length now comes from
ReachAlongaround the head withDEFAULT_INTERACTIVE_DISTANCE, and the area cast is skipped when the swept sphere doesn't fit (OverrideAreaRay). Blueprint copy/cut/delete go through the native actions and are gated onIsCopyPastingEnabled. The EMP HUD copies the game's own distortion and hides signals whileAreSignalsFlickeredOffis set. The VR HUD doesn't show anything the native HUD hides. - Other plugins. The symmetry-plane capture moved from a global
MyRenderProxy.DebugDrawTriangleprefix to a transpiler onMyCubeBuilder.DrawSymmetryPlane, so other callers of that proxy method are no longer affected. The SmoothFrames bridge patches SmoothFrames'RunFrame,SnapAndDefer,PublishPendingSnapandCameraHistory.TryGetPairat its hub pin34d51d0; all those members exist there. The guard uses its own Harmony id and is unpatched by that id on dispose.
Findings
Low: the SmoothFrames trace adds a new CSV to the user data root in normal play. ThirdPersonView L209 calls StereoRenderState.RequestTrace() the first time a third-person view starts. ThirdPersonView.Reset clears that flag on world reset, VR cleanup and spectator entry. This range made RequestTrace also call SmoothFramesBridge.Request. When SmoothFrames is installed, the bridge records 240 frames (L288), about 50 rows per frame by my count, most of them 12-number matrices. Save then writes SEVR-smoothframes-<UTC timestamp>.csv straight into MyFileSystem.UserDataPath. The older SEVR-render-trace.csv keeps overwriting one file. This one gets a new name every time, so a VR player with SmoothFrames gains a file of a megabyte or more per world session, plus one per spectator round trip. Nothing deletes these files, and the player isn't told about them. Please write the trace only when it is asked for with the developer options' "Capture trace" button (or under SEVR_DIAGNOSTICS), or keep a single overwritten file under UserDataPath/SEVR/. The tradeoff is that you no longer get a trace automatically from a user's first third-person view.
Low: a bridge failure leaves SmoothFrames' interpolation off after VR stops. Fail sets SmoothFrames.Plugin.InterpolationEnabled to false while VR is active. It writes the static field and not SetInterpolationEnabled, so the saved SmoothFrames setting stays the same. Nothing turns it back on, though. If VR then stops (SteamVR quit, VR failure, desktop fallback), SmoothFrames stays off on the desktop for the rest of the session, while the log says "suspended while VR is active". The AllowSmoothing guard already skips RunFrame while VR is active and the bridge has failed. Restoring the previous value when VR stops would match the message.
Non-blocking notes
Note: WindowsOpenVR duplicates a file OVRSharp already provides. See above. It is the same DLL, so nothing changes at runtime. It does add a raw.githubusercontent.com download to every Windows and Proton build, and a failed or slow download fails the whole plugin build. If you added it for a case where OVRSharp's copy was missing, it would help to say which one. Otherwise it can go.
Updates Space Engineers VR from 58d63d1 (v1.6.1) to 148efd6 (v2.0.4). Per-release notes.
Notes for review