Fix AI shooting by adding Action button bindings#2
Conversation
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughAdds action-button wiring in ChangesInput, environment, and dependency updates
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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 |
There was a problem hiding this comment.
Code Review
This pull request updates the control logic in init.lua to bind the mButtonDownAction and mButtonFrameAction inputs to the firing command. Feedback suggests that this change may cause unintended side effects, such as the agent accidentally interacting with environmental objects or portals during combat, and recommends exploring ways to separate combat actions from environmental interactions.
| -- Fire: Fix "eternal first frame" bug by using local agent_was_firing | ||
| cset(ctrl, "mButtonDownFire", do_fire) | ||
| cset(ctrl, "mButtonDownLeftClick", do_fire) | ||
| cset(ctrl, "mButtonDownAction", do_fire) |
There was a problem hiding this comment.
Binding mButtonDownAction to the fire command will cause the agent to trigger environmental interactions (such as picking up items, swapping wands, or entering portals) every time it attempts to shoot. While this may be a necessary workaround if the engine requires it for wand usage in this context, it introduces a significant side effect where the agent might unintentionally teleport or replace its equipment during combat. Consider if this binding can be restricted to specific item types or if a dedicated interaction action should be added to the action space to separate combat from interaction.
|
@copilot resolve the merge conflicts in this pull request |
Co-authored-by: yava-code <185186582+yava-code@users.noreply.github.com>
I've resolved the merge conflicts with main. The tests are passing correctly. |
The AI bot was unable to shoot because the engine relies on the
mButtonDownActionandmButtonFrameActionfields to trigger wand usage. This fix ensures that whendo_fireis active, the corresponding Action button fields in theControlsComponentare accurately updated.PR created automatically by Jules for task 14484808672928127370 started by @yava-code
Summary by CodeRabbit
Bug Fixes
Tests
Chores