diff options
Diffstat (limited to 'src/core/player.cc')
-rw-r--r-- | src/core/player.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/core/player.cc b/src/core/player.cc index b54bf9e..8fc4ebf 100644 --- a/src/core/player.cc +++ b/src/core/player.cc @@ -9,18 +9,22 @@ namespace core { -Player Player::local; - Player::Player() { - player_id = 0; - player_name.clear(); - dirty = false; - control = 0; + clear(); } Player::~Player() { + clear(); +} + +void Player::clear() +{ + player_id = 0; + player_name.clear(); + dirty = false; + control = 0; } } |