Debugging trick, comment.

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2479 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
meep-eep
2006-10-29 04:39:41 +00:00
parent 463308897d
commit fc45a926d5
+16 -1
View File
@@ -239,7 +239,22 @@ networkBattleInput(COUNT player, STARSHIPPTR StarShipPtr) {
BATTLE_INPUT_STATE result; BATTLE_INPUT_STATE result;
for (;;) { for (;;) {
bool ok = BattleInputBuffer_pop(bib, &result); bool ok;
#if 0
// This is a useful debugging trick. By enabling this #if
// block, this side will always lag the maximum number of frames
// behind the other side. When the remote side stops on some event
// (a breakpoint or so), this side will stop too, waiting for input
// in the loop below, but it won't have processed the frame that
// triggered the event yet. If you then jump over this 'if'
// statement here, you can walk through the decisive frames
// manually. Works best with no input delay.
if (bib->size <= getBattleInputDelay() + 1) {
ok = false;
} else
#endif
ok = BattleInputBuffer_pop(bib, &result);
// Get the input from the front of the // Get the input from the front of the
// buffer. // buffer.
if (ok) if (ok)