Skip to content

[HL2MP] HL2MP bot possession + CHL2MPRules::AllowDefaultItems/Suit#455

Merged
Blixibon merged 4 commits into
mapbase-source:mapbase-mp-2025from
Blixibon:mapbase/mp-2025/hl2mp-coop-utils
Aug 7, 2025
Merged

[HL2MP] HL2MP bot possession + CHL2MPRules::AllowDefaultItems/Suit#455
Blixibon merged 4 commits into
mapbase-source:mapbase-mp-2025from
Blixibon:mapbase/mp-2025/hl2mp-coop-utils

Conversation

@Blixibon
Copy link
Copy Markdown
Member

This PR adds the ability to have a bot take over a player in HL2MP. It also adds two utility functions to CHL2MPRules which had some degree of overlap in code. The changes can be viewed as two separate commits.

The bot possession code takes advantage of AFK handling ported from TF2 by having an additional AFK mode for temporarily replacing the player with a bot, similar to Left 4 Dead. A new attribute can also be added to an existing bot which allows players to possess it by interacting with it, similar to Half-Life: Decay.


PR Checklist

  • My PR follows all guidelines in the CONTRIBUTING.md file
  • My PR targets a develop branch OR targets another branch with a specific goal in mind

Comment thread src/game/server/hl2mp/bot/hl2mp_bot.cpp
Copy link
Copy Markdown
Collaborator

@arbabf arbabf left a comment

Choose a reason for hiding this comment

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

There are a few issues I saw, but otherwise this looks good.

Comment thread src/game/server/hl2mp/bot/hl2mp_bot_manager.cpp
Comment thread src/game/server/hl2mp/hl2mp_player.cpp Outdated
Comment thread src/game/server/hl2mp/hl2mp_player.h
Copy link
Copy Markdown
Collaborator

@arbabf arbabf left a comment

Choose a reason for hiding this comment

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

Looks good to me

@Blixibon Blixibon merged commit 15c2f7a into mapbase-source:mapbase-mp-2025 Aug 7, 2025
4 checks passed
@Blixibon Blixibon deleted the mapbase/mp-2025/hl2mp-coop-utils branch August 7, 2025 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants