mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 20:11:50 +00:00
refactor: change pointer parameters to references for Level and Content in various classes
This commit is contained in:
parent
ef2c0b2370
commit
c1b311f3c4
41 changed files with 258 additions and 251 deletions
|
|
@ -39,7 +39,7 @@ struct CursorSelection {
|
|||
};
|
||||
|
||||
class Player : public Serializable {
|
||||
Level* level;
|
||||
Level& level;
|
||||
int64_t id;
|
||||
std::string name;
|
||||
float speed;
|
||||
|
|
@ -57,12 +57,12 @@ class Player : public Serializable {
|
|||
public:
|
||||
std::unique_ptr<Chunks> chunks;
|
||||
std::shared_ptr<Camera> fpCamera, spCamera, tpCamera;
|
||||
std::shared_ptr<Camera> currentCamera;;
|
||||
glm::vec3 cam {};
|
||||
std::shared_ptr<Camera> currentCamera;
|
||||
glm::vec3 rotation {};
|
||||
CursorSelection selection {};
|
||||
|
||||
Player(
|
||||
Level* level,
|
||||
Level& level,
|
||||
int64_t id,
|
||||
const std::string& name,
|
||||
glm::vec3 position,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue