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
3 changes: 3 additions & 0 deletions include/sc2api/sc2_coordinator.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ class Coordinator {
//! ability ids are generalized to BUILD_TECHLAB ability id in the observation.
void SetUseGeneralizedAbilityId(bool value);

//! Sets the replay perspective. 0 to observe "Everyone"
void SetReplayPerspective(int perspective=1);

//! Appends a command line argument to be fed to StarCraft II when starting.
// \param option The string to be appended to the executable invoke.
void AddCommandLine(const std::string& option);
Expand Down
5 changes: 4 additions & 1 deletion src/sc2api/sc2_coordinator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -922,9 +922,12 @@ void Coordinator::SetUseGeneralizedAbilityId(bool value) {
imp_->use_generalized_ability_id = value;
}

void Coordinator::SetReplayPerspective(int perspective) {
imp_->replay_settings_.player_id = perspective;
}

bool Coordinator::SetReplayPath(const std::string& path) {
imp_->replay_settings_.replay_file.clear();

if (HasExtension(path, ".SC2Replay")) {
imp_->replay_settings_.replay_file.push_back(path);
}
Expand Down