macressler / bwapi

Automatically exported from code.google.com/p/bwapi
1 stars 0 forks source link

Weapon Cooldown is always 0 for Reavers #223

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Seems the weapon cooldown is always 0 and isStartingAttack() always false for 
reavers. Haven't noticed it with anything else. I'm running r2255.

Tested with:
std::set<BWAPI::Unit*> selectedUnits = BWAPI::Broodwar->getSelectedUnits();
if(selectedUnits.size() == 1)
{
    BWAPI::Unit* selected = *selectedUnits.begin();
    if(selected != NULL)
    {
        BWAPI::Broodwar->drawText(BWAPI::CoordinateType::Screen, 450, 45, "Selected unit: %s", selected->getType().getName().c_str());

        if(selected->isStartingAttack())
            BWAPI::Broodwar->drawText(BWAPI::CoordinateType::Screen, 450, 55, "    - Starting Attack");
        else
            BWAPI::Broodwar->drawText(BWAPI::CoordinateType::Screen, 450, 55, "    - Not Starting Attack");

        BWAPI::Broodwar->drawText(BWAPI::CoordinateType::Screen, 450, 65, "    - Ground Cooldown: %d", selected->getGroundWeaponCooldown());
        BWAPI::Broodwar->drawText(BWAPI::CoordinateType::Screen, 450, 75, "    - Air Cooldown: %d", selected->getAirWeaponCooldown());
    }
}

Original issue reported on code.google.com by quaver.smith on 6 Jun 2010 at 12:37

GoogleCodeExporter commented 9 years ago

Original comment by lowerlo...@gmail.com on 6 Jun 2010 at 4:06

GoogleCodeExporter commented 9 years ago
Fixed in r2338.

Original comment by lowerlo...@gmail.com on 6 Jun 2010 at 4:36