From b5b5551fcd418d99ae6a9ad8ecdc89f2057d0014 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Thu, 26 Jan 2017 13:13:43 +0200 Subject: [PATCH] [Client] Add LocalPlayer::hasFinishedCharGen() method --- apps/openmw/mwmp/LocalPlayer.cpp | 8 ++++++++ apps/openmw/mwmp/LocalPlayer.hpp | 1 + 2 files changed, 9 insertions(+) diff --git a/apps/openmw/mwmp/LocalPlayer.cpp b/apps/openmw/mwmp/LocalPlayer.cpp index de9f2b261..4e50c05fd 100644 --- a/apps/openmw/mwmp/LocalPlayer.cpp +++ b/apps/openmw/mwmp/LocalPlayer.cpp @@ -146,6 +146,14 @@ bool LocalPlayer::charGenThread() return true; } +bool LocalPlayer::hasFinishedCharGen() +{ + if (charGenStage.end == 0) + return true; + + return false; +} + void LocalPlayer::updateDynamicStats(bool forceUpdate) { MWWorld::Ptr player = getPlayerPtr(); diff --git a/apps/openmw/mwmp/LocalPlayer.hpp b/apps/openmw/mwmp/LocalPlayer.hpp index c6f8492d0..85afc587d 100644 --- a/apps/openmw/mwmp/LocalPlayer.hpp +++ b/apps/openmw/mwmp/LocalPlayer.hpp @@ -22,6 +22,7 @@ namespace mwmp void charGen(int stageFirst, int stageEnd); bool charGenThread(); // return true if CGStage::current == CGStage::end + bool hasFinishedCharGen(); void updateDynamicStats(bool forceUpdate = false); void updateAttributes(bool forceUpdate = false);