s2client-api icon indicating copy to clipboard operation
s2client-api copied to clipboard

Using DebugInterface from ReplayObserver

Open LordBlackhawk opened this issue 7 years ago • 1 comments

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.

LordBlackhawk avatar Oct 22 '17 08:10 LordBlackhawk

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.

KevinCalderone avatar Oct 27 '17 21:10 KevinCalderone