GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Unpowered buildings can't cancel production · Issue #918 · bwapi/bwapi

Unpowered buildings can't cancel production #918

New issue
Copy link
New issue
Copy link
Open
Open
Unpowered buildings can't cancel production#918
Copy link

Description

@dgant
dgant
opened on Aug 21, 2026
Issue body actions

Your Gateway is training a Dragoon. Some mean player has destroyed your Artosis Pylon that was powering it. Now you want to cancel the unit to get your money back.

"I'll issue a Cancel command," you think, "just like I do every time this happens to me on ladder."

BWAPI will just check whether I can issue a command to this unit, decide that I can, and then allow my Cancel command to go through, right?

...oh.
...oh no.

https://github.com/bwapi/bwapi/blob/main/bwapi/BWAPI/Source/BWAPI/UnitImpl.cpp#L90
https://github.com/bwapi/bwapi/blob/main/bwapi/Shared/Templates.h#L416

I believe check blocks the command on both the client (for client bots) and server.

I believe the correct fix is to remove the isPowered test on the command filter; I do not think this check is necessary, but also have not deeply considered the consequences of allowing the command to go through.

Activity

  1. NiteKat commented on Aug 21, 2026

    @NiteKat
    NiteKat
    on Aug 21, 2026
    More actions

    I see how this is blocking commands for unpowered units, and how that could end up blocking the cancel command... but I think a more nuanced approach would be needed. Too late for me to look further into this tonight, but we would need to confirm that removing that check wouldn't allow any other commands through. A warping building's only valid command is to be cancelled. Maybe that logic is handled elsewhere though (like training commands would be stopped by another condition elsewhere in the codebase, given you can't send a cancel command to a completed building, for example?)

  2. dgant commented on Aug 24, 2026

    @dgant
    dgant
    on Aug 24, 2026
    ContributorAuthor
    More actions

    You can definitely send a cancel command to a completed building both in practice and via BWAPI. PurpleWave does the "fake cyber core upgrade to hide DT tech" for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.