diff --git a/include/sc2api/sc2_unit.h b/include/sc2api/sc2_unit.h index 8c6c31bc..006a8a66 100644 --- a/include/sc2api/sc2_unit.h +++ b/include/sc2api/sc2_unit.h @@ -93,6 +93,8 @@ class Unit { //! Unit cloak state. enum CloakState { + //! Under the fog, so unknown whether it's cloaked or not. + CloakedUnknown = 0, //! Cloaked, invisible to enemies until detected. Cloaked = 1, //! Cloaked enemy, but detected. diff --git a/src/sc2api/sc2_proto_to_pods.cc b/src/sc2api/sc2_proto_to_pods.cc index 8c8f7c9b..2aa9d065 100644 --- a/src/sc2api/sc2_proto_to_pods.cc +++ b/src/sc2api/sc2_proto_to_pods.cc @@ -149,6 +149,7 @@ bool Convert(const SC2APIProtocol::Alliance& alliance_proto, Unit::Alliance& all bool Convert(const SC2APIProtocol::CloakState& cloak_proto, Unit::CloakState& cloak) { switch (cloak_proto) { + case SC2APIProtocol::CloakState::CloakedUnknown: cloak = Unit::CloakedUnknown; return true; case SC2APIProtocol::CloakState::Cloaked: cloak = Unit::Cloaked; return true; case SC2APIProtocol::CloakState::CloakedDetected: cloak = Unit::CloakedDetected; return true; case SC2APIProtocol::CloakState::NotCloaked: cloak = Unit::NotCloaked; return true;