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:
virtual void move(f32 dtime, Environment *env, f32 pos_max_d)
{}
virtual void move(f32 dtime, Environment *env, f32 pos_max_d,
- std::list<CollisionInfo> *collision_info)
+ std::vector<CollisionInfo> *collision_info)
{}
v3f getSpeed()
{
m_speed = speed;
}
-
+
void accelerateHorizontal(v3f target_speed, f32 max_increase);
void accelerateVertical(v3f target_speed, f32 max_increase);
bool is_climbing;
bool swimming_vertical;
bool camera_barely_in_ceiling;
-
+
Inventory inventory;
f32 movement_acceleration_default;
u16 peer_id;
std::string inventory_formspec;
-
+
PlayerControl control;
PlayerControl getPlayerControl()
{
return control;
}
-
+
u32 keyPressed;
-
+
HudElement* getHud(u32 id);
u32 addHud(HudElement* hud);
void setPlayerSAO(PlayerSAO *sao)
{ m_sao = sao; }
void setPosition(const v3f &position);
-
+
private:
PlayerSAO *m_sao;
};