From 3b9a5d94db35f44387843365ed13bd6c01f42214 Mon Sep 17 00:00:00 2001 From: Michael Meyer Date: Wed, 13 Nov 2024 13:47:23 -0500 Subject: [PATCH] Don't call dump_everything() if startscummed Followup to c3f35e08: After that commit the game shouldn't have written to a dumplog file under those circumstances anyway (dump_open_log was already skipped if 'startscummed' was set, so dump_everything ought to have just returned early after finding neither 'dumplog_file' nor 'dumphtml_file'), but still better to be explicit and not rely solely on dump_everything. Also add a comment explaining why the change was made. --- src/end.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/end.c b/src/end.c index ee3876dc4..f550452b6 100644 --- a/src/end.c +++ b/src/end.c @@ -1308,7 +1308,10 @@ int how; #endif /* END TNNT code */ - /* Don't produce a dumplog for scummed games */ + /* TNNT: Don't produce a dumplog for scummed games. All the writes were + * contributing to serious server load when players were startscumming at + * an extremely rapid pace (whether violating the rules by using a script, + * or just quitting and restarting games very quickly by hand). */ startscummed = ((how == QUIT || how == ESCAPED) && moves <= 100L); if (!startscummed) @@ -1410,7 +1413,8 @@ int how; if (strcmp(flags.end_disclose, "none")) disclose(how, taken); - dump_everything(how, endtime); + if (!startscummed) + dump_everything(how, endtime); } /* if pets will contribute to score, populate mydogs list now