mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 20:41:49 +00:00
add new players finding functions
This commit is contained in:
parent
2210ba8218
commit
9cb9b095e8
3 changed files with 86 additions and 0 deletions
|
|
@ -1,7 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <unordered_map>
|
||||
#include <glm/vec3.hpp>
|
||||
|
||||
#include "typedefs.hpp"
|
||||
#include "interfaces/Serializable.hpp"
|
||||
|
|
@ -34,6 +36,10 @@ public:
|
|||
|
||||
void remove(int64_t id);
|
||||
|
||||
std::vector<Player*> getAllInRadius(const glm::vec3& center, float radius) const;
|
||||
std::vector<Player*> getAll() const;
|
||||
Player* getNearest(const glm::vec3& position) const;
|
||||
|
||||
dv::value serialize() const override;
|
||||
|
||||
void deserialize(const dv::value& src) override;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue