forked from mirror/openmw-tes3mp
Add resumeGame method
This commit is contained in:
parent
84b80ae405
commit
51d369d4da
5 changed files with 15 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
||||||
Bug #2326: After a bound item expires the last equipped item of that type is not automatically re-equipped
|
Bug #2326: After a bound item expires the last equipped item of that type is not automatically re-equipped
|
||||||
Bug #2455: Creatures attacks degrade armor
|
Bug #2455: Creatures attacks degrade armor
|
||||||
Bug #2562: Forcing AI to activate a teleport door sometimes causes a crash
|
Bug #2562: Forcing AI to activate a teleport door sometimes causes a crash
|
||||||
|
Bug #2626: Resurrecting the player does not resume the game
|
||||||
Bug #2772: Non-existing class or faction freezes the game
|
Bug #2772: Non-existing class or faction freezes the game
|
||||||
Bug #2835: Player able to slowly move when overencumbered
|
Bug #2835: Player able to slowly move when overencumbered
|
||||||
Bug #2852: No murder bounty when a player follower commits murder
|
Bug #2852: No murder bounty when a player follower commits murder
|
||||||
|
|
|
@ -55,6 +55,8 @@ namespace MWBase
|
||||||
|
|
||||||
virtual void endGame() = 0;
|
virtual void endGame() = 0;
|
||||||
|
|
||||||
|
virtual void resumeGame() = 0;
|
||||||
|
|
||||||
virtual void deleteGame (const MWState::Character *character, const MWState::Slot *slot) = 0;
|
virtual void deleteGame (const MWState::Character *character, const MWState::Slot *slot) = 0;
|
||||||
|
|
||||||
virtual void saveGame (const std::string& description, const MWState::Slot *slot = 0) = 0;
|
virtual void saveGame (const std::string& description, const MWState::Slot *slot = 0) = 0;
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
#include "../mwbase/dialoguemanager.hpp"
|
#include "../mwbase/dialoguemanager.hpp"
|
||||||
#include "../mwbase/mechanicsmanager.hpp"
|
#include "../mwbase/mechanicsmanager.hpp"
|
||||||
|
#include "../mwbase/statemanager.hpp"
|
||||||
#include "../mwbase/windowmanager.hpp"
|
#include "../mwbase/windowmanager.hpp"
|
||||||
#include "../mwbase/world.hpp"
|
#include "../mwbase/world.hpp"
|
||||||
|
|
||||||
|
@ -1139,7 +1140,11 @@ namespace MWScript
|
||||||
MWWorld::Ptr ptr = R()(runtime);
|
MWWorld::Ptr ptr = R()(runtime);
|
||||||
|
|
||||||
if (ptr == MWMechanics::getPlayer())
|
if (ptr == MWMechanics::getPlayer())
|
||||||
|
{
|
||||||
ptr.getClass().getCreatureStats(ptr).resurrect();
|
ptr.getClass().getCreatureStats(ptr).resurrect();
|
||||||
|
if (MWBase::Environment::get().getStateManager()->getState() == MWBase::StateManager::State_Ended)
|
||||||
|
MWBase::Environment::get().getStateManager()->resumeGame();
|
||||||
|
}
|
||||||
else if (ptr.getClass().getCreatureStats(ptr).isDead())
|
else if (ptr.getClass().getCreatureStats(ptr).isDead())
|
||||||
{
|
{
|
||||||
bool wasEnabled = ptr.getRefData().isEnabled();
|
bool wasEnabled = ptr.getRefData().isEnabled();
|
||||||
|
|
|
@ -173,6 +173,11 @@ void MWState::StateManager::endGame()
|
||||||
mState = State_Ended;
|
mState = State_Ended;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MWState::StateManager::resumeGame()
|
||||||
|
{
|
||||||
|
mState = State_Running;
|
||||||
|
}
|
||||||
|
|
||||||
void MWState::StateManager::saveGame (const std::string& description, const Slot *slot)
|
void MWState::StateManager::saveGame (const std::string& description, const Slot *slot)
|
||||||
{
|
{
|
||||||
MWState::Character* character = getCurrentCharacter();
|
MWState::Character* character = getCurrentCharacter();
|
||||||
|
|
|
@ -48,6 +48,8 @@ namespace MWState
|
||||||
|
|
||||||
virtual void endGame();
|
virtual void endGame();
|
||||||
|
|
||||||
|
virtual void resumeGame();
|
||||||
|
|
||||||
virtual void deleteGame (const MWState::Character *character, const MWState::Slot *slot);
|
virtual void deleteGame (const MWState::Character *character, const MWState::Slot *slot);
|
||||||
///< Delete a saved game slot from this character. If all save slots are deleted, the character will be deleted too.
|
///< Delete a saved game slot from this character. If all save slots are deleted, the character will be deleted too.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue