Skip to content

Commit ab9f3b9

Browse files
committed
Player class: disable copy
1 parent 182bd6a commit ab9f3b9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/player.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
2323
#include "irrlichttypes_bloated.h"
2424
#include "inventory.h"
2525
#include "constants.h"
26+
#include "util/basic_macros.h"
2627
#include <list>
2728
#include <mutex>
2829

@@ -88,16 +89,15 @@ struct CollisionInfo;
8889
struct HudElement;
8990
class Environment;
9091

91-
// IMPORTANT:
92-
// Do *not* perform an assignment or copy operation on a Player or
93-
// RemotePlayer object! This will copy the lock held for HUD synchronization
9492
class Player
9593
{
9694
public:
9795

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

99+
DISABLE_CLASS_COPY(Player);
100+
101101
virtual void move(f32 dtime, Environment *env, f32 pos_max_d)
102102
{}
103103
virtual void move(f32 dtime, Environment *env, f32 pos_max_d,

0 commit comments

Comments
 (0)