forked from teamnwah/openmw-tes3coop
Revert "improvement to bug fix http://bugs.openmw.org/issues/428"
This reverts commit c0d07fbdc9
.
This commit is contained in:
parent
c0d07fbdc9
commit
e480e31d1e
2 changed files with 29 additions and 35 deletions
|
@ -180,9 +180,7 @@ namespace MWInput
|
||||||
switch (action)
|
switch (action)
|
||||||
{
|
{
|
||||||
case A_GameMenu:
|
case A_GameMenu:
|
||||||
if(!(MWWorld::Class::get(mPlayer->getPlayer()).getCreatureStats(mPlayer->getPlayer()).isDead()
|
toggleMainMenu ();
|
||||||
&& MWBase::Environment::get().getWindowManager()->getMode () == MWGui::GM_MainMenu ) )
|
|
||||||
toggleMainMenu ();
|
|
||||||
break;
|
break;
|
||||||
case A_Screenshot:
|
case A_Screenshot:
|
||||||
screenshot();
|
screenshot();
|
||||||
|
@ -302,9 +300,7 @@ namespace MWInput
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Disable movement in Gui mode
|
// Disable movement in Gui mode
|
||||||
if (MWBase::Environment::get().getWindowManager()->isGuiMode()
|
if (MWBase::Environment::get().getWindowManager()->isGuiMode()) return;
|
||||||
|| MWWorld::Class::get(mPlayer->getPlayer()).getCreatureStats(mPlayer->getPlayer()).isDead() )
|
|
||||||
return;
|
|
||||||
|
|
||||||
|
|
||||||
// Configure player movement according to keyboard input. Actual movement will
|
// Configure player movement according to keyboard input. Actual movement will
|
||||||
|
@ -371,28 +367,29 @@ namespace MWInput
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MWWorld::Ptr player = MWBase::Environment::get().getWorld ()->getPlayer().getPlayer();
|
||||||
|
if ( !player.getClass().getCreatureStats(player).isDead() ) {
|
||||||
|
if (mControlSwitch["playerviewswitch"]) {
|
||||||
|
// work around preview mode toggle when pressing Alt+Tab
|
||||||
|
if (actionIsActive(A_TogglePOV) && !mInputManager->isModifierHeld(SDL_Keymod(KMOD_ALT))) {
|
||||||
|
|
||||||
if (mControlSwitch["playerviewswitch"]) {
|
if (mPreviewPOVDelay <= 0.5 &&
|
||||||
// work around preview mode toggle when pressing Alt+Tab
|
(mPreviewPOVDelay += dt) > 0.5)
|
||||||
if (actionIsActive(A_TogglePOV) && !mInputManager->isModifierHeld(SDL_Keymod(KMOD_ALT))) {
|
{
|
||||||
|
mPreviewPOVDelay = 1.f;
|
||||||
if (mPreviewPOVDelay <= 0.5 &&
|
MWBase::Environment::get().getWorld()->togglePreviewMode(true);
|
||||||
(mPreviewPOVDelay += dt) > 0.5)
|
}
|
||||||
{
|
} else {
|
||||||
mPreviewPOVDelay = 1.f;
|
if (mPreviewPOVDelay > 0.5) {
|
||||||
MWBase::Environment::get().getWorld()->togglePreviewMode(true);
|
//disable preview mode
|
||||||
|
MWBase::Environment::get().getWorld()->togglePreviewMode(false);
|
||||||
|
} else if (mPreviewPOVDelay > 0.f) {
|
||||||
|
MWBase::Environment::get().getWorld()->togglePOV();
|
||||||
|
}
|
||||||
|
mPreviewPOVDelay = 0.f;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
if (mPreviewPOVDelay > 0.5) {
|
|
||||||
//disable preview mode
|
|
||||||
MWBase::Environment::get().getWorld()->togglePreviewMode(false);
|
|
||||||
} else if (mPreviewPOVDelay > 0.f) {
|
|
||||||
MWBase::Environment::get().getWorld()->togglePOV();
|
|
||||||
}
|
|
||||||
mPreviewPOVDelay = 0.f;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (actionIsActive(A_MoveForward) ||
|
if (actionIsActive(A_MoveForward) ||
|
||||||
actionIsActive(A_MoveBackward) ||
|
actionIsActive(A_MoveBackward) ||
|
||||||
|
|
|
@ -1062,9 +1062,9 @@ bool CharacterController::kill()
|
||||||
{
|
{
|
||||||
//player death animation is over: toggle game menu without 'return' option
|
//player death animation is over: toggle game menu without 'return' option
|
||||||
if( mPtr == MWBase::Environment::get().getWorld()->getPlayer().getPlayer()
|
if( mPtr == MWBase::Environment::get().getWorld()->getPlayer().getPlayer()
|
||||||
&& !isAnimPlaying(mCurrentDeath) && MWBase::Environment::get().getWindowManager()->getMode () != MWGui::GM_MainMenu )
|
&& !isAnimPlaying(mCurrentDeath) )
|
||||||
{
|
{
|
||||||
MWWorld::Class::get(mPtr).getCreatureStats(mPtr).setHealth(0);
|
MWBase::Environment::get().getWindowManager()->setMainMenuNoReturn(true);
|
||||||
MWBase::Environment::get().getWindowManager()->pushGuiMode (MWGui::GM_MainMenu);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode (MWGui::GM_MainMenu);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -1106,12 +1106,9 @@ bool CharacterController::kill()
|
||||||
|
|
||||||
if(mAnimation)
|
if(mAnimation)
|
||||||
{
|
{
|
||||||
if (mPtr == MWBase::Environment::get().getWorld()->getPlayer().getPlayer() )
|
if (mPtr == MWBase::Environment::get().getWorld()->getPlayer().getPlayer()
|
||||||
{
|
&& MWBase::Environment::get().getWorld()->getCamera()->isFirstPerson() )
|
||||||
MWBase::Environment::get().getWindowManager()->setMainMenuNoReturn(true);
|
MWBase::Environment::get().getWorld()->togglePOV();
|
||||||
if (MWBase::Environment::get().getWorld()->getCamera()->isFirstPerson() )
|
|
||||||
MWBase::Environment::get().getWorld()->togglePOV();
|
|
||||||
}
|
|
||||||
|
|
||||||
mAnimation->play(mCurrentDeath, Priority_Death, MWRender::Animation::Group_All,
|
mAnimation->play(mCurrentDeath, Priority_Death, MWRender::Animation::Group_All,
|
||||||
false, 1.0f, "start", "stop", 0.0f, 0);
|
false, 1.0f, "start", "stop", 0.0f, 0);
|
||||||
|
|
Loading…
Reference in a new issue