Skip to content

Commit

Permalink
Player class: disable copy
Browse files Browse the repository at this point in the history
  • Loading branch information
nerzhul committed Aug 14, 2017
1 parent 182bd6a commit ab9f3b9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/player.h
Expand Up @@ -23,6 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "irrlichttypes_bloated.h"
#include "inventory.h"
#include "constants.h"
#include "util/basic_macros.h"
#include <list>
#include <mutex>

Expand Down Expand Up @@ -88,16 +89,15 @@ struct CollisionInfo;
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:

Player(const char *name, IItemDefManager *idef);
virtual ~Player() = 0;

DISABLE_CLASS_COPY(Player);

virtual void move(f32 dtime, Environment *env, f32 pos_max_d)
{}
virtual void move(f32 dtime, Environment *env, f32 pos_max_d,
Expand Down

0 comments on commit ab9f3b9

Please sign in to comment.