Skip to content

Directed Bot Jumping#276

Merged
billy1arm merged 1 commit intomangoszero:masterfrom
bozimmerman:bot_jumping
Mar 16, 2026
Merged

Directed Bot Jumping#276
billy1arm merged 1 commit intomangoszero:masterfrom
bozimmerman:bot_jumping

Conversation

@bozimmerman
Copy link
Contributor

@bozimmerman bozimmerman commented Mar 16, 2026

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 Reviewable

Copilot AI review requested due to automatic review settings March 16, 2026 05:47
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: jump and jump 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 new MovementInfo setters 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;
@AppVeyorBot
Copy link

@billy1arm billy1arm merged commit 46f8d75 into mangoszero:master Mar 16, 2026
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants