From 71c7fedb7394933df345d8fcbf0202a78f3b52de Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Mon, 23 Jul 2018 01:17:10 -0400 Subject: Fix NaNs in serverMap When there are very few touched tiles, even if they are recent, they will appear blue, because timeMin is also recent. I should figure out how to fix that. --- client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'client.c') diff --git a/client.c b/client.c index ca09283..06987e4 100644 --- a/client.c +++ b/client.c @@ -360,10 +360,10 @@ static void serverMap(void) { for (int x = 0; x < MAP_COLS; ++x) { struct MapTile tile = map.tiles[y][x]; - double count = (tile.modifyCount) + double count = (tile.modifyCount && countMax > 1) ? log(tile.modifyCount) / log(countMax) : 0.0; - double time = (tile.modifyTime) + double time = (tile.modifyTime && timeNow - timeMin) ? (double)(tile.modifyTime - timeMin) / (double)(timeNow - timeMin) : 0.0; count *= ARRAY_LEN(MAP_CELLS) - 2; -- cgit 1.4.1 127e496dd9d17'>refs log tree commit diff
path: root/doc/zlib/gzread.3 (unfollow)
Commit message (Expand)Author
2022-06-25Bump xterm font size to 12June McEnroe
2022-06-10Handle subshells (and functions) inside substitutionsJune McEnroe
2022-06-10Switch to jorts Install scriptJune McEnroe
2022-06-08Indicate if still reading or no resultsJune McEnroe
2022-06-08Add Maiden, Mother, CroneJune McEnroe
2022-06-05FIRST SHOW IN 2.5 YEARS BABEY!!!June McEnroe
2022-06-03Set line number on File linesJune McEnroe
2022-06-03Stop polling stdin after EOFJune McEnroe
2022-06-02Set TABSIZE=4June McEnroe
2022-06-02Do basic match highlightingJune McEnroe
2022-06-02Clean up parsing a littleJune McEnroe
2022-06-02Don't duplicate path stringJune McEnroe
2022-06-02Use stderr instead of /dev/tty, realloc buffer if lines too longJune McEnroe
2022-06-02Add initial working version of qfJune McEnroe
2022-05-29Set prompt for okshJune McEnroe