diff options
author | June McEnroe <june@causal.agency> | 2019-01-04 11:01:49 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2019-01-04 11:01:49 -0500 |
commit | 85ae39946323bee87595842deaf296b2ff457549 (patch) | |
tree | bffeb1ba6c27382bc4a20034b984cdea15d06399 /server.c | |
parent | Call cap_enter in client and server (diff) | |
download | torus-85ae39946323bee87595842deaf296b2ff457549.tar.gz torus-85ae39946323bee87595842deaf296b2ff457549.zip |
Restore old data format
Diffstat (limited to 'server.c')
-rw-r--r-- | server.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/server.c b/server.c index a662efd..1547519 100644 --- a/server.c +++ b/server.c @@ -64,25 +64,25 @@ static void tilesMap(const char *path) { static struct Tile *tileGet(uint32_t tileX, uint32_t tileY) { struct Tile *tile = &tiles[tileY * TileRows + tileX]; - if (!tile->meta.createTime) { + if (!tile->createTime) { memset(tile->cells, ' ', CellsSize); memset(tile->colors, ColorWhite, CellsSize); - tile->meta.createTime = time(NULL); + tile->createTime = time(NULL); } return tile; } static struct Tile *tileAccess(uint32_t tileX, uint32_t tileY) { struct Tile *tile = tileGet(tileX, tileY); - tile->meta.accessTime = time(NULL); - tile->meta.accessCount++; + tile->accessTime = time(NULL); + tile->accessCount++; return tile; } static struct Tile *tileModify(uint32_t tileX, uint32_t tileY) { struct Tile *tile = tileGet(tileX, tileY); - tile->meta.modifyTime = time(NULL); - tile->meta.modifyCount++; + tile->modifyTime = time(NULL); + tile->modifyCount++; return tile; } @@ -310,7 +310,7 @@ static bool clientMap(const struct Client *client) { for (int32_t x = 0; x < MapCols; ++x) { uint32_t tileY = ((mapY + y) % TileRows + TileRows) % TileRows; uint32_t tileX = ((mapX + x) % TileCols + TileCols) % TileCols; - struct Meta meta = tiles[tileY * TileRows + tileX].meta; + struct Meta meta = tileMeta(&tiles[tileY * TileRows + tileX]); if (meta.createTime) { if (meta.createTime < map.min.createTime) { |