fix: update camera compatibility for RuneLite 1.12.31#1806
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughEntityOps#getSubOps(int idx) is annotated as nullable. Rs2Camera now converts camera pitch and yaw between client and legacy angle units, clamps and applies camera targets through client-thread helpers, and updates smoothing math to use the legacy scale. NpcTracker now computes yaw in two steps and schedules the yaw target update on the client thread. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
4eca217 to
2403283
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/camera/Rs2Camera.java`:
- Around line 289-297: The yaw validation in Rs2Camera’s setYaw and
setYawInstant now rejects the documented north value 2048, so update these
methods to normalize that input to the internal north equivalent before the
range check and then proceed through smoothTo or setCameraTargetOnClientThread.
Keep the public yaw contract in sync with the implementation by handling 2048
explicitly in the yaw normalization/validation path rather than silently
no-oping.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 44a4caf9-fca9-4b1e-ba30-abc30e97732d
📒 Files selected for processing (3)
runelite-api/src/main/java/net/runelite/api/EntityOps.javarunelite-client/src/main/java/net/runelite/client/plugins/microbot/util/camera/NpcTracker.javarunelite-client/src/main/java/net/runelite/client/plugins/microbot/util/camera/Rs2Camera.java
|
Addressed the CodeRabbit yaw normalization finding in the latest push.
|
Summary
Follow-up Microbot camera/API compatibility hardening after the RuneLite 1.12.31 update already landed upstream.
This PR does not change the RuneLite version. It keeps the current upstream baseline and updates Microbot camera helpers around the changed client-side camera angle scale.
Changes
NpcTrackeryaw targeting to use the same conversion/client-thread path.EntityOps#getSubOps(int)nullable to reflect sparse/optional sub-op tables.Validation
git diff --check upstream/development...HEAD./gradlew.bat :client:compileJava --console=plain