mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-17 11:43:25 +00:00
Update weapon icon in HUD when save is loaded.
This commit is contained in:
parent
235dbdf18e
commit
bcacdc49af
@ -25,6 +25,7 @@
|
||||
#include "../mwworld/player.hpp"
|
||||
#include "../mwworld/class.hpp"
|
||||
#include "../mwworld/cellstore.hpp"
|
||||
#include "../mwworld/inventorystore.hpp"
|
||||
|
||||
#include "../mwmechanics/npcstats.hpp"
|
||||
|
||||
@ -303,6 +304,10 @@ void MWState::StateManager::loadGame (const Character *character, const Slot *sl
|
||||
MWBase::Environment::get().getMechanicsManager()->playerLoaded();
|
||||
|
||||
MWWorld::Ptr ptr = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
||||
|
||||
//Update the weapon icon in the hud with whatever the player is currently holding.
|
||||
MWWorld::InventoryStore& invStore = ptr.getClass().getInventoryStore(ptr);
|
||||
MWBase::Environment::get().getWindowManager()->setSelectedWeapon(*invStore.getSlot(MWWorld::InventoryStore::Slot_CarriedRight));
|
||||
|
||||
ESM::CellId cellId = ptr.getCell()->getCell()->getCellId();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user