void sim::UnitProps::SetType(BWAPI::UnitType type) { this->type = type; maxEnergy[0] = maxEnergy[1] = type.maxEnergy(); sightRange[0] = sightRange[1] = type.sightRange() << pixelShift; extraArmor[0] = extraArmor[1] = 0; speed[0] = speed[1] = static_cast<int>((1 << pixelShift) * type.topSpeed()); }