Skip to content

Commit dbfee9b

Browse files
committed
feat: add missing implementation to tas commands
1 parent c14797f commit dbfee9b

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

src/Features/Tas/TasPlayer.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,19 @@ TasPlayer::~TasPlayer() {
136136
//framebulkQueue[1].clear();
137137
}
138138

139+
bool TasPlayer::IsUsingTools() const {
140+
if (!sar_tas_tools_enabled.GetBool()) {
141+
return false;
142+
}
143+
144+
if (sar_tas_tools_force.GetBool()) {
145+
return true;
146+
}
147+
148+
return (playbackInfo.slots[0].IsActive() && !playbackInfo.slots[0].IsRaw())
149+
|| (playbackInfo.slots[1].IsActive() && !playbackInfo.slots[1].IsRaw());
150+
}
151+
139152
void TasPlayer::Activate(TasPlaybackInfo info) {
140153

141154
if (!info.HasActiveSlot()) return;

src/Features/Tas/TasPlayer.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,10 @@ class TasPlayer : public Feature {
8989
inline bool IsReady() const { return ready; };
9090
inline bool IsRunning() const { return active && startTick != -1; }
9191
inline bool IsPaused() const { return paused; }
92-
inline bool IsUsingTools() const {
93-
return (playbackInfo.slots[0].IsActive() && !playbackInfo.slots[0].IsRaw()) || (playbackInfo.slots[1].IsActive() && !playbackInfo.slots[1].IsRaw());
94-
}
9592
inline int GetScriptVersion(int slot) const { return playbackInfo.slots[slot].header.version; }
9693

94+
bool IsUsingTools() const;
95+
9796
void PlayFile(std::string slot0scriptPath, std::string slot1scriptPath);
9897
void PlayScript(std::string slot0name, std::string slot0script, std::string slot1name, std::string slot1script);
9998
void PlaySingleCoop(std::string file, int slot);

0 commit comments

Comments
 (0)