refactor: change pointer parameters to references for Level and Content in various classes

This commit is contained in:
MihailRis
2024-12-25 18:53:53 +03:00
parent ef2c0b2370
commit c1b311f3c4
41 changed files with 258 additions and 251 deletions
+4 -4
View File
@@ -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,