Add carry bomb feature: pick up, hold (timer frozen), drop or throw#15
Draft
Add carry bomb feature: pick up, hold (timer frozen), drop or throw#15
Conversation
Agent-Logs-Url: https://github.com/PascalCorpsman/fpc_atomic/sessions/5dc237bd-be10-4159-8018-49b05f57a30c Co-authored-by: ChrisWiGit <12424397+ChrisWiGit@users.noreply.github.com>
…n RenderHeldBombs Agent-Logs-Url: https://github.com/PascalCorpsman/fpc_atomic/sessions/5dc237bd-be10-4159-8018-49b05f57a30c Co-authored-by: ChrisWiGit <12424397+ChrisWiGit@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
ChrisWiGit
April 14, 2026 15:24
View session
Collaborator
|
@PascalCorpsman für Samstag |
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.
Summary
Implements the Carry Bomb feature from the original Atomic Bomberman.
When the player collects the blue glove powerup (
CanGrabBombs), they can now:Changes
units/uatomic_common.pasbmHeldtoTBombMoveDirenumHeldBombIndex: Integerto server-sideTPlayerrecordIsHeld: Booleanto client-sideTBombInforecordProtocollVersion13 → 14 (stream format changed) andVersion0.13001 → 0.13002units/uatomic_field.pasFielWalkable/GetBombIndex: excludebmHeldbombs (carried bomb is transparent to movement/kick)HandleActionPlayer: early-exit block handles drop (aaFirst) and throw (aaFirstDouble) when player is carrying; pick-up code inaaFirstDouble+CanGrabBombsnow setsbmHeld+HeldBombIndexinstead of immediately throwing; punch and remote-trigger code excludebmHeldbombsHandleBombs: newbmHeldcase undoes the per-frame lifetime increment (same pattern asbmFly) and updates bomb position to follow the carrier (skipped while player is flying); flame-triggered detonation check excludesbmHeld; bomb-removal loop keepsHeldBombIndexconsistent for all playersKillPlayer: releases held bomb (sets tobmNone) before marking player as dyingAppendGamingData: serialisesIsHeldflag per bombGetAiInfo: exposesHeldfield inTAiBombInfoserver/uatomic_server.pasHeldBombIndex := -1in the per-round player setup loopclient/ugame.pasIsHeldfrom the game streamRenderBombs: skips held bombsRenderHeldBombs: draws held bombs above the player's head atatomic_Layer + epsilon(rendered after all players)server/uai_types.pas+ai_c/ai_types.hHeld: cBool/bool Heldfield to the AI bomb info structsMANUAL.md