X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fplayer.h;h=7d8d245e319c09b0a5298bc0d95546e16b2ab50a;hb=d4d561fbcdac0175584e4f62bc6c3bfdf83510f1;hp=d4698ea4a7e810509f7edc044e4b93daee8f4783;hpb=0ae75f2a4e3107271924311b93327ff4b6c24e8c;p=dragonfireclient.git diff --git a/src/player.h b/src/player.h index d4698ea4a..7d8d245e3 100644 --- a/src/player.h +++ b/src/player.h @@ -92,6 +92,9 @@ class PlayerSAO; struct HudElement; class Environment; +// IMPORTANT: +// Do *not* perform an assignment or copy operation on a Player or +// RemotePlayer object! This will copy the lock held for HUD synchronization class Player { public: @@ -102,7 +105,7 @@ class Player virtual void move(f32 dtime, Environment *env, f32 pos_max_d) {} virtual void move(f32 dtime, Environment *env, f32 pos_max_d, - std::list *collision_info) + std::vector *collision_info) {} v3f getSpeed() @@ -114,7 +117,7 @@ class Player { m_speed = speed; } - + void accelerateHorizontal(v3f target_speed, f32 max_increase); void accelerateVertical(v3f target_speed, f32 max_increase); @@ -252,7 +255,7 @@ class Player bool is_climbing; bool swimming_vertical; bool camera_barely_in_ceiling; - + Inventory inventory; f32 movement_acceleration_default; @@ -285,15 +288,15 @@ class Player u16 peer_id; std::string inventory_formspec; - + PlayerControl control; PlayerControl getPlayerControl() { return control; } - + u32 keyPressed; - + HudElement* getHud(u32 id); u32 addHud(HudElement* hud); @@ -346,7 +349,7 @@ class RemotePlayer : public Player void setPlayerSAO(PlayerSAO *sao) { m_sao = sao; } void setPosition(const v3f &position); - + private: PlayerSAO *m_sao; };