From 25b5a727e855d6bdecef1166cb1a0177261b255c Mon Sep 17 00:00:00 2001 From: signde Date: Thu, 16 Sep 2004 06:17:50 +0000 Subject: [PATCH] (svn r268) -Fix: console-command: script command now stops recording correctly -Fix: network client should not stop sending ready packets anymore [client should not timeout without any reason] --- console_cmds.c | 3 +-- network.c | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/console_cmds.c b/console_cmds.c index 2d336b52e6..c9fc837fe6 100644 --- a/console_cmds.c +++ b/console_cmds.c @@ -182,12 +182,11 @@ DEF_CONSOLE_CMD(ConReturn) DEF_CONSOLE_CMD(ConScript) { extern FILE* _iconsole_output_file; - if (_iconsole_output_file!=NULL) { - if (argc<2) return NULL; IConsolePrintF(_iconsole_color_default,"file output complete"); fclose(_iconsole_output_file); } else { + if (argc<2) return NULL; IConsolePrintF(_iconsole_color_default,"file output started to: %s",argv[1]); _iconsole_output_file = fopen(argv[1],"ab"); if (_iconsole_output_file == NULL) IConsoleError("could not open file"); diff --git a/network.c b/network.c index c9aa2a7853..1fdccc3d22 100644 --- a/network.c +++ b/network.c @@ -352,9 +352,8 @@ static void QueueClear(CommandQueue *nq) static int GetNextSyncFrame() { uint32 newframe; - if (_frame_fsync_last == 0) return -5; - newframe = (_frame_fsync_last + 10); // do not use a multiple of 4 since that screws up sync-packets - if ( (newframe + 4) > _frame_counter_max) return -5; + if (_frame_fsync_last == 0) return -11; + newframe = (_frame_fsync_last + 11); // do not use a multiple of 4 since that screws up sync-packets return (_frame_counter_max - newframe); }