diff options
Diffstat (limited to '')
-rw-r--r-- | server.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/server.c b/server.c index 47441cc..f90f369 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) { |