Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions include/sc2api/sc2_unit.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions src/sc2api/sc2_proto_to_pods.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down