Merge remote-tracking branch 'scrawl/openmw-31' into openmw-31

This commit is contained in:
Marc Zinnschlag 2014-07-08 07:53:53 +02:00
commit 0e229108f4
9 changed files with 31 additions and 3 deletions

View file

@ -153,6 +153,11 @@ void CompanionWindow::onReferenceUnavailable()
MWBase::Environment::get().getWindowManager()->removeGuiMode(GM_Companion); MWBase::Environment::get().getWindowManager()->removeGuiMode(GM_Companion);
} }
void CompanionWindow::resetReference()
{
ReferenceInterface::resetReference();
mItemView->setModel(NULL);
}
} }

View file

@ -20,6 +20,8 @@ namespace MWGui
virtual void exit(); virtual void exit();
virtual void resetReference();
void open(const MWWorld::Ptr& npc); void open(const MWWorld::Ptr& npc);
void onFrame (); void onFrame ();

View file

@ -258,6 +258,12 @@ namespace MWGui
onTakeAllButtonClicked(mTakeButton); onTakeAllButtonClicked(mTakeButton);
} }
void ContainerWindow::resetReference()
{
ReferenceInterface::resetReference();
mItemView->setModel(NULL);
}
void ContainerWindow::close() void ContainerWindow::close()
{ {
WindowBase::close(); WindowBase::close();

View file

@ -54,6 +54,8 @@ namespace MWGui
void open(const MWWorld::Ptr& container, bool loot=false); void open(const MWWorld::Ptr& container, bool loot=false);
virtual void close(); virtual void close();
virtual void resetReference();
virtual void exit(); virtual void exit();
private: private:

View file

@ -531,4 +531,10 @@ namespace MWGui
sellerStats.setLastRestockTime(MWBase::Environment::get().getWorld()->getTimeStamp()); sellerStats.setLastRestockTime(MWBase::Environment::get().getWorld()->getTimeStamp());
} }
} }
void TradeWindow::resetReference()
{
ReferenceInterface::resetReference();
mItemView->setModel(NULL);
}
} }

View file

@ -37,6 +37,7 @@ namespace MWGui
virtual void exit(); virtual void exit();
virtual void resetReference();
private: private:
ItemView* mItemView; ItemView* mItemView;

View file

@ -570,10 +570,14 @@ CharacterController::CharacterController(const MWWorld::Ptr &ptr, MWRender::Anim
if (cls.hasInventoryStore(mPtr)) if (cls.hasInventoryStore(mPtr))
{ {
getActiveWeapon(cls.getCreatureStats(mPtr), cls.getInventoryStore(mPtr), &mWeaponType); getActiveWeapon(cls.getCreatureStats(mPtr), cls.getInventoryStore(mPtr), &mWeaponType);
if (mWeaponType != WeapType_None)
{
mUpperBodyState = UpperCharState_WeapEquiped;
getWeaponGroup(mWeaponType, mCurrentWeapon);
}
if(mWeaponType != WeapType_None && mWeaponType != WeapType_Spell && mWeaponType != WeapType_HandToHand) if(mWeaponType != WeapType_None && mWeaponType != WeapType_Spell && mWeaponType != WeapType_HandToHand)
{ {
getWeaponGroup(mWeaponType, mCurrentWeapon);
mUpperBodyState = UpperCharState_WeapEquiped;
mAnimation->showWeapons(true); mAnimation->showWeapons(true);
mAnimation->setWeaponGroup(mCurrentWeapon); mAnimation->setWeaponGroup(mCurrentWeapon);
} }

View file

@ -149,6 +149,8 @@ namespace MWRender
mViewModeToggleQueued = true; mViewModeToggleQueued = true;
return; return;
} }
else
mViewModeToggleQueued = false;
mFirstPersonView = !mFirstPersonView; mFirstPersonView = !mFirstPersonView;
processViewChange(); processViewChange();

View file

@ -1088,7 +1088,7 @@ public:
void close() { } void close() { }
bool update(Ogre::MaterialPtr &mat, Ogre::Rectangle2D *rect, int screen_width, int screen_height) bool update()
{ return false; } { return false; }
}; };