Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds chat-driven jumping capabilities for player bots, including a directed “jump” that moves to the master’s position and then jumps, plus a “jump up” in-place jump for synchronized party jumping.
Changes:
- Registers new chat triggers/commands:
jumpandjump up. - Adds new movement actions (
JumpAction,JumpInPlaceAction) and wires them into the action/trigger system. - Implements jump state, packet emission, and jump simulation/update logic in
PlayerbotAI, plus newMovementInfosetters used by the jump packets.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/modules/Bots/playerbot/strategy/triggers/ChatTriggerContext.h | Adds trigger creators for jump and jump up. |
| src/modules/Bots/playerbot/strategy/generic/ChatCommandHandlerStrategy.cpp | Adds trigger nodes and marks jump/jump up as supported commands. |
| src/modules/Bots/playerbot/strategy/actions/MovementActions.h | Declares JumpAction and JumpInPlaceAction. |
| src/modules/Bots/playerbot/strategy/actions/MovementActions.cpp | Implements JumpAction::Execute and JumpInPlaceAction::Execute. |
| src/modules/Bots/playerbot/strategy/actions/ActionContext.h | Registers new actions in the action factory. |
| src/modules/Bots/playerbot/PlayerbotAI.h | Adds jump API and jump state fields to PlayerbotAI. |
| src/modules/Bots/playerbot/PlayerbotAI.cpp | Implements jump request/start/update logic and hooks it into UpdateAI(). |
| src/game/Object/Unit.h | Adds MovementInfo::SetJumpInfo and SetFallTime helpers. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Comment on lines
+674
to
+676
| void SetJumpInfo(float vel, float sinA, float cosA, float xyspd) | ||
| { | ||
| jump.velocity = vel; jump.sinAngle = sinA; jump.cosAngle = cosA; jump.xyspeed = xyspd; |
| if (forward) | ||
| bot->m_movementInfo.AddMovementFlag(MOVEFLAG_FORWARD); | ||
| bot->m_movementInfo.SetFallTime(0); | ||
| bot->m_movementInfo.SetJumpInfo(-BOT_JUMP_VELOCITY, m_jumpCosAngle, m_jumpSinAngle, m_jumpXYSpeed); |
| } | ||
| else | ||
| { | ||
| bot->GetMotionMaster()->MovePoint(0, m_jumpTargetX, m_jumpTargetY, m_jumpTargetZ); |
| return; | ||
|
|
||
| Player* master = GetMaster(); | ||
| if (!master) |
Comment on lines
+641
to
+645
| if (ai->IsJumping()) | ||
| return false; | ||
|
|
||
| ai->StartJump(false); | ||
| return true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds two new chat bot commands with associated functionality:
"jump" to make the bot track to the master and jump from their position. Useful for (again) Blackfathom Deeps (and others?)
"jump up" also added, just because it's fun to make a party of bots all jump at the same time.
This change is