s2client-api
s2client-api copied to clipboard
Using DebugInterface from ReplayObserver
I was tring to use the DebugInterface to present information within the StarCraft window. I tried the following code inside OnStep():
auto d = Debug();
d->DebugTextOut("blub", { 0.5f, 0.5f });
d->SendDebug();
During runtime, I get the following error:
While waiting for ResponseDebug received an error. Error: Can't save a replay of a replay
What is the problem? Is it a bug, then please fit it. Is the DebugInterface not meant for ReplayObservers, then please move Debug() from Client to Agent.
We blocked the DebugInterface since some parts like DebugCreateUnit don't make sense in replays. However I agree a subset of it like DebugTextOut does still make sense. We could change it to allow some of the commands to still work in replays.
Also, that particular error string is just wrong. We can fix that.