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

sc2api : Update Convert CloakState #306

Open piroxiljin opened 5 years ago

piroxiljin commented 5 years ago

There is an issue with receiving of the observation object (#301).

Particularly, received data is converted to unit pool in the sc2_proto_to_pods.cc file. And the conversion function checks that received data is correct and all units are in known state.

For some reason the game sets flag has_cloak and send CloakState as CloakedUnknown. Conversion routine did not take it into account and returned status failure. So that, unit pool stays not initialized.

This request adds new cloak state CloakedUnknown and updates the conversion routine, so it returns success in such case,

minchopaskal commented 5 years ago

Aren't proto files supposed to be auto-generated by gRPC

piroxiljin commented 5 years ago

@minchopaskal you should be right I was unsure if I have a correct tools and able to find a proper way to regenerate it from scratch. I have decided just to fix obvious error to play with api. And as we see at #316 there still are many issues which I miss.