about summary refs log tree commit diff homepage
path: root/client.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-08-21 14:00:15 -0400
committerJune McEnroe <june@causal.agency>2018-08-21 14:00:59 -0400
commitd8c973966760095026218ab09be8d30eb9983e3b (patch)
tree9dff0fa40a56907d3740a4c2147d24174efeb40a /client.c
parentRemove spawns (diff)
downloadtorus-d8c973966760095026218ab09be8d30eb9983e3b.tar.gz
torus-d8c973966760095026218ab09be8d30eb9983e3b.zip
Shrink the torus and rearrange struct Tile
Diffstat (limited to 'client.c')
-rw-r--r--client.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/client.c b/client.c
index 1e3421b..cb0107e 100644
--- a/client.c
+++ b/client.c
@@ -346,23 +346,23 @@ static void serverMap(void) {
 	time_t timeMin = timeNow;
 	for (int y = 0; y < MAP_ROWS; ++y) {
 		for (int x = 0; x < MAP_COLS; ++x) {
-			struct MapTile tile = map.tiles[y][x];
-			if (countMax < tile.modifyCount) countMax = tile.modifyCount;
-			if (tile.modifyTime && timeMin > tile.modifyTime) {
-				timeMin = tile.modifyTime;
+			struct Meta meta = map.meta[y][x];
+			if (countMax < meta.modifyCount) countMax = meta.modifyCount;
+			if (meta.modifyTime && timeMin > meta.modifyTime) {
+				timeMin = meta.modifyTime;
 			}
 		}
 	}
 
 	for (int y = 0; y < MAP_ROWS; ++y) {
 		for (int x = 0; x < MAP_COLS; ++x) {
-			struct MapTile tile = map.tiles[y][x];
+			struct Meta meta = map.meta[y][x];
 
-			double count = (tile.modifyCount && countMax > 1)
-				? log(tile.modifyCount) / log(countMax)
+			double count = (meta.modifyCount && countMax > 1)
+				? log(meta.modifyCount) / log(countMax)
 				: 0.0;
-			double time = (tile.modifyTime && timeNow - timeMin)
-				? (double)(tile.modifyTime - timeMin) / (double)(timeNow - timeMin)
+			double time = (meta.modifyTime && timeNow - timeMin)
+				? (double)(meta.modifyTime - timeMin) / (double)(timeNow - timeMin)
 				: 0.0;
 			count *= ARRAY_LEN(MAP_CELLS) - 2;
 			time *= ARRAY_LEN(MAP_COLORS) - 1;