Blizzard / s2client-api

StarCraft II Client - C++ library supported on Windows, Linux and Mac designed for building scripted bots and research using the SC2API.
MIT License
1.66k stars 281 forks source link

unit buffs stack #151

Closed fsolecki closed 7 years ago

fsolecki commented 7 years ago

Is it normal that Unit buffs stack in unit->buffs (not removed between each step) ? In comparison to orders that are emptied.

In sc2_proto_to_pods.cc:bool Convert(const ObservationRawPtr& observation_raw, UnitPool& unit_pool, uint32_t game_loop): unit->buffs.clear(); seems to be missing before

for (int buff_index = 0; buff_index < observation_unit.buff_ids_size(); ++buff_index) {
   unit->buffs.push_back(observation_unit.buff_ids(buff_index));
}
AnthonyBrunasso commented 7 years ago

Ah, this appears to be a an oversight from the unit pointer refactor.

I will fix this and link to this issue in the commit. Thank you!

AnthonyBrunasso commented 7 years ago

Resolved by #152