Repository navigation
Update Absolute Position Fix for Space Engineers 1.211.017 - #377
viktor-ferenczi merged 1 commit into
Conversation
viktor-ferenczi
left a comment
There was a problem hiding this comment.
Version bump review of hub head 80960bd74f525aa7d2248bcf55acb81e98365df4: blazeblue32/AbsolutePositionFix 490e0317c71db9307cf8945ed9e15644ea66f10c..213f893a52697f7b7a52610164b6581c7d636d55 (one commit, 8 files, +94/-10).
No agent-detected blockers. The change adds two "already fixed by the game" checks so the BotAvoidance and PathWaypointReached fixes stand down on Space Engineers 1.211.017, and leaves the other 14 fixes as they were.
Manifest
Only <Commit> changes. python test.py Plugins/ from the hub head passes, and so does the xml-check CI job. The pin is main HEAD of the target repository, so there's no drift. The server-side bump in CometWorks/magnetar-hub#186 pins the same commit.
Security
Nothing new in scope: no network, file, process, reflection-on-input, or native code, and no package, project reference or binary changes. Version.Build.props and the #if !LOCAL_BUILD assembly attributes both move to 1.0.1. The new code reads the game's original IL once at startup through PatchProcessor.GetOriginalInstructions, so it costs nothing per frame.
Checked against the 1.211.017 game code
- BotAvoidance:
GamePassesExactDifferencelooks for exactly oneComputePredictiveCorrectioncall whose onlyVector3D -> Vector3narrowing directly followsVector3D.op_Subtraction, within 14 instructions before the call. In the installed 1.211.017Sandbox.Game.dll,MyCharacterAvoidanceSteering.AccumulateCorrectioncomputesVector3 pRel = position - vector3Dand passespRel(ComputePredictiveCorrection(Vector3 pRel, ...)). The disassembly putsop_Implicitat call-13 andop_Subtractionat call-14, inside the window, so the check matches. The old transpiler would have thrown on that IL ("2 narrowings" expected) and logged FAILED. Older builds have two narrowings, so the check returns false and the patch still applies. - PathWaypointReached:
GameAlreadyMeasuresInDoubleskips a site only when it has no floatVector3.Distance[Squared]call left. The rewriter needs that float call, so a skipped site could not have been patched anyway: the check changes only the log line, never a patch that would have worked. In 1.211.017,MyRDPath.GetNextTargetusesVector3D.Distance(target, position). The other distance sites (drone waypoint, character light LOD, entity cycling, entity list, hand drill, armor hit face, autopilot detected objects/terrain hit) still call floatVector3.Distance[Squared], so they still get patched. That matches the README's "14 initialised, 2 not needed".
Non-blocking notes
- In
ApplyFix, a multi-site fix where no site is patched, some are "not needed" and others fail prints only the per-site FAILED lines, with no summary of the skipped ones. None of the current fixes hits this on 1.211.017. It only affects logs.
Update the pin from 490e031 to 213f893 for Space Engineers 1.211.017.
What changed in the game: Keen fixed two of the bugs this plugin worked around (the waypoint-reached distance in MyRDPath.GetNextTarget, and the position pair passed by the humanoid bot avoidance). Those two fixes now recognise the corrected code, log "not needed" and leave the game's method untouched; on older game builds they still apply. The other 14 fixes initialise unchanged. Version 1.0.1.
Compare: blazeblue32/AbsolutePositionFix@490e031...213f893
Tested: all 16 fixes load against the 1.211.017 client and dedicated-server files (14 initialised, 2 not needed), and the code compiles for .NET Framework 4.8. Not yet tested in-game on 1.211.017. No game code in the repository; no network, file, process or native access; licence MIT.