nanoMMO 0.97.8
Building an MMO: The Engineering Series
Loading...
Searching...
No Matches
interest.h File Reference
#include <compare>
#include <cstdint>
#include <map>
#include <vector>
#include "server/world.h"

Go to the source code of this file.

Classes

struct  nanommo::Cell
struct  nanommo::View
 What the players in a cell get: the players, monsters and NPCs near it. More...

Namespaces

namespace  nanommo

Typedefs

using nanommo::Cells = std::map<Cell, std::vector<uint32_t>>
 The ids of what's in each cell.

Functions

Cell nanommo::CellOf (float x, float z)
bool nanommo::Near (Cell from, Cell to)
template<typename Unit>
Cells nanommo::CellsOf (const std::map< uint32_t, Unit > &units)
std::map< Cell, View > nanommo::Views (const std::map< uint32_t, Player > &players, const std::map< uint32_t, Monster > &monsters, const Cells &npcs)

Variables

constexpr float nanommo::kCellSize = 32.0f
 In metres, like the client's chunks.
constexpr int nanommo::kInterestCells = 2
 Cells each way, so that a player gets everyone within 64 metres.