mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-19 15:25:39 +00:00
(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]
This commit is contained in:
parent
cbcf002a91
commit
25b5a727e8
@ -182,12 +182,11 @@ DEF_CONSOLE_CMD(ConReturn)
|
|||||||
DEF_CONSOLE_CMD(ConScript)
|
DEF_CONSOLE_CMD(ConScript)
|
||||||
{
|
{
|
||||||
extern FILE* _iconsole_output_file;
|
extern FILE* _iconsole_output_file;
|
||||||
|
|
||||||
if (_iconsole_output_file!=NULL) {
|
if (_iconsole_output_file!=NULL) {
|
||||||
if (argc<2) return NULL;
|
|
||||||
IConsolePrintF(_iconsole_color_default,"file output complete");
|
IConsolePrintF(_iconsole_color_default,"file output complete");
|
||||||
fclose(_iconsole_output_file);
|
fclose(_iconsole_output_file);
|
||||||
} else {
|
} else {
|
||||||
|
if (argc<2) return NULL;
|
||||||
IConsolePrintF(_iconsole_color_default,"file output started to: %s",argv[1]);
|
IConsolePrintF(_iconsole_color_default,"file output started to: %s",argv[1]);
|
||||||
_iconsole_output_file = fopen(argv[1],"ab");
|
_iconsole_output_file = fopen(argv[1],"ab");
|
||||||
if (_iconsole_output_file == NULL) IConsoleError("could not open file");
|
if (_iconsole_output_file == NULL) IConsoleError("could not open file");
|
||||||
|
@ -352,9 +352,8 @@ static void QueueClear(CommandQueue *nq)
|
|||||||
static int GetNextSyncFrame()
|
static int GetNextSyncFrame()
|
||||||
{
|
{
|
||||||
uint32 newframe;
|
uint32 newframe;
|
||||||
if (_frame_fsync_last == 0) return -5;
|
if (_frame_fsync_last == 0) return -11;
|
||||||
newframe = (_frame_fsync_last + 10); // do not use a multiple of 4 since that screws up sync-packets
|
newframe = (_frame_fsync_last + 11); // do not use a multiple of 4 since that screws up sync-packets
|
||||||
if ( (newframe + 4) > _frame_counter_max) return -5;
|
|
||||||
return (_frame_counter_max - newframe);
|
return (_frame_counter_max - newframe);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user