mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 05:53:50 +00:00
Merge branch 'master' into startscript
This commit is contained in:
commit
844b6011bc
16 changed files with 54 additions and 29 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -30,6 +30,7 @@ cmake-build-*
|
||||||
files/windows/*.aps
|
files/windows/*.aps
|
||||||
## qt-creator
|
## qt-creator
|
||||||
CMakeLists.txt.user*
|
CMakeLists.txt.user*
|
||||||
|
.vs
|
||||||
|
|
||||||
## resources
|
## resources
|
||||||
data
|
data
|
||||||
|
|
|
@ -2,6 +2,9 @@
|
||||||
------
|
------
|
||||||
|
|
||||||
Bug #5364: Script fails/stops if trying to startscript an unknown script
|
Bug #5364: Script fails/stops if trying to startscript an unknown script
|
||||||
|
Bug #5367: Selecting a spell on an enchanted item per hotkey always plays the equip sound
|
||||||
|
Bug #5369: Spawnpoint in the Grazelands doesn't produce oversized creatures
|
||||||
|
Feature #5362: Show the soul gems' trapped soul in count dialog
|
||||||
|
|
||||||
0.46.0
|
0.46.0
|
||||||
------
|
------
|
||||||
|
|
|
@ -125,6 +125,7 @@ namespace MWClass
|
||||||
const MWWorld::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
const MWWorld::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
||||||
MWWorld::ManualRef manualRef(store, id);
|
MWWorld::ManualRef manualRef(store, id);
|
||||||
manualRef.getPtr().getCellRef().setPosition(ptr.getCellRef().getPosition());
|
manualRef.getPtr().getCellRef().setPosition(ptr.getCellRef().getPosition());
|
||||||
|
manualRef.getPtr().getCellRef().setScale(ptr.getCellRef().getScale());
|
||||||
MWWorld::Ptr placed = MWBase::Environment::get().getWorld()->placeObject(manualRef.getPtr(), ptr.getCell() , ptr.getCellRef().getPosition());
|
MWWorld::Ptr placed = MWBase::Environment::get().getWorld()->placeObject(manualRef.getPtr(), ptr.getCell() , ptr.getCellRef().getPosition());
|
||||||
customData.mSpawnActorId = placed.getClass().getCreatureStats(placed).getActorId();
|
customData.mSpawnActorId = placed.getClass().getCreatureStats(placed).getActorId();
|
||||||
customData.mSpawn = false;
|
customData.mSpawn = false;
|
||||||
|
|
|
@ -141,8 +141,6 @@ namespace MWClass
|
||||||
|
|
||||||
MWGui::ToolTipInfo info;
|
MWGui::ToolTipInfo info;
|
||||||
|
|
||||||
const MWWorld::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
|
||||||
|
|
||||||
bool gold = isGold(ptr);
|
bool gold = isGold(ptr);
|
||||||
if (gold)
|
if (gold)
|
||||||
count *= getValue(ptr);
|
count *= getValue(ptr);
|
||||||
|
@ -153,18 +151,9 @@ namespace MWClass
|
||||||
else // gold displays its count also if it's 1.
|
else // gold displays its count also if it's 1.
|
||||||
countString = " (" + std::to_string(count) + ")";
|
countString = " (" + std::to_string(count) + ")";
|
||||||
|
|
||||||
info.caption = MyGUI::TextIterator::toTagsString(getName(ptr)) + countString;
|
info.caption = MyGUI::TextIterator::toTagsString(getName(ptr)) + countString + MWGui::ToolTips::getSoulString(ptr.getCellRef());
|
||||||
info.icon = ref->mBase->mIcon;
|
info.icon = ref->mBase->mIcon;
|
||||||
|
|
||||||
if (ref->mRef.getSoul() != "")
|
|
||||||
{
|
|
||||||
const ESM::Creature *creature = store.get<ESM::Creature>().search(ref->mRef.getSoul());
|
|
||||||
if (creature && !creature->mName.empty())
|
|
||||||
info.caption += " (" + creature->mName + ")";
|
|
||||||
else if (creature)
|
|
||||||
info.caption += " (" + creature->mId + ")";
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
|
|
||||||
text += MWGui::ToolTips::getWeightString(ref->mBase->mData.mWeight, "#{sWeight}");
|
text += MWGui::ToolTips::getWeightString(ref->mBase->mData.mWeight, "#{sWeight}");
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
#include "draganddrop.hpp"
|
#include "draganddrop.hpp"
|
||||||
#include "countdialog.hpp"
|
#include "countdialog.hpp"
|
||||||
#include "widgets.hpp"
|
#include "widgets.hpp"
|
||||||
|
#include "tooltips.hpp"
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
@ -86,7 +87,8 @@ void CompanionWindow::onItemSelected(int index)
|
||||||
if (count > 1 && !shift)
|
if (count > 1 && !shift)
|
||||||
{
|
{
|
||||||
CountDialog* dialog = MWBase::Environment::get().getWindowManager()->getCountDialog();
|
CountDialog* dialog = MWBase::Environment::get().getWindowManager()->getCountDialog();
|
||||||
dialog->openCountDialog(object.getClass().getName(object), "#{sTake}", count);
|
std::string name = object.getClass().getName(object) + MWGui::ToolTips::getSoulString(object.getCellRef());
|
||||||
|
dialog->openCountDialog(name, "#{sTake}", count);
|
||||||
dialog->eventOkClicked.clear();
|
dialog->eventOkClicked.clear();
|
||||||
dialog->eventOkClicked += MyGUI::newDelegate(this, &CompanionWindow::dragItem);
|
dialog->eventOkClicked += MyGUI::newDelegate(this, &CompanionWindow::dragItem);
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include "sortfilteritemmodel.hpp"
|
#include "sortfilteritemmodel.hpp"
|
||||||
#include "pickpocketitemmodel.hpp"
|
#include "pickpocketitemmodel.hpp"
|
||||||
#include "draganddrop.hpp"
|
#include "draganddrop.hpp"
|
||||||
|
#include "tooltips.hpp"
|
||||||
|
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
|
@ -79,7 +80,8 @@ namespace MWGui
|
||||||
if (count > 1 && !shift)
|
if (count > 1 && !shift)
|
||||||
{
|
{
|
||||||
CountDialog* dialog = MWBase::Environment::get().getWindowManager()->getCountDialog();
|
CountDialog* dialog = MWBase::Environment::get().getWindowManager()->getCountDialog();
|
||||||
dialog->openCountDialog(object.getClass().getName(object), "#{sTake}", count);
|
std::string name = object.getClass().getName(object) + MWGui::ToolTips::getSoulString(object.getCellRef());
|
||||||
|
dialog->openCountDialog(name, "#{sTake}", count);
|
||||||
dialog->eventOkClicked.clear();
|
dialog->eventOkClicked.clear();
|
||||||
dialog->eventOkClicked += MyGUI::newDelegate(this, &ContainerWindow::dragItem);
|
dialog->eventOkClicked += MyGUI::newDelegate(this, &ContainerWindow::dragItem);
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
#include "tradewindow.hpp"
|
#include "tradewindow.hpp"
|
||||||
#include "draganddrop.hpp"
|
#include "draganddrop.hpp"
|
||||||
#include "widgets.hpp"
|
#include "widgets.hpp"
|
||||||
|
#include "tooltips.hpp"
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
@ -298,7 +299,8 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
CountDialog* dialog = MWBase::Environment::get().getWindowManager()->getCountDialog();
|
CountDialog* dialog = MWBase::Environment::get().getWindowManager()->getCountDialog();
|
||||||
std::string message = mTrading ? "#{sQuanityMenuMessage01}" : "#{sTake}";
|
std::string message = mTrading ? "#{sQuanityMenuMessage01}" : "#{sTake}";
|
||||||
dialog->openCountDialog(object.getClass().getName(object), message, count);
|
std::string name = object.getClass().getName(object) + MWGui::ToolTips::getSoulString(object.getCellRef());
|
||||||
|
dialog->openCountDialog(name, message, count);
|
||||||
dialog->eventOkClicked.clear();
|
dialog->eventOkClicked.clear();
|
||||||
if (mTrading)
|
if (mTrading)
|
||||||
dialog->eventOkClicked += MyGUI::newDelegate(this, &InventoryWindow::sellItem);
|
dialog->eventOkClicked += MyGUI::newDelegate(this, &InventoryWindow::sellItem);
|
||||||
|
|
|
@ -401,6 +401,7 @@ namespace MWGui
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!store.isEquipped(item))
|
||||||
MWBase::Environment::get().getWindowManager()->useItem(item);
|
MWBase::Environment::get().getWindowManager()->useItem(item);
|
||||||
MWWorld::ConstContainerStoreIterator rightHand = store.getSlot(MWWorld::InventoryStore::Slot_CarriedRight);
|
MWWorld::ConstContainerStoreIterator rightHand = store.getSlot(MWWorld::InventoryStore::Slot_CarriedRight);
|
||||||
// change draw state only if the item is in player's right hand
|
// change draw state only if the item is in player's right hand
|
||||||
|
@ -411,8 +412,8 @@ namespace MWGui
|
||||||
}
|
}
|
||||||
else if (key->type == Type_MagicItem)
|
else if (key->type == Type_MagicItem)
|
||||||
{
|
{
|
||||||
// equip, if it can be equipped
|
// equip, if it can be equipped and isn't yet equipped
|
||||||
if (!item.getClass().getEquipmentSlots(item).first.empty())
|
if (!item.getClass().getEquipmentSlots(item).first.empty() && !store.isEquipped(item))
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getWindowManager()->useItem(item);
|
MWBase::Environment::get().getWindowManager()->useItem(item);
|
||||||
|
|
||||||
|
|
|
@ -647,6 +647,20 @@ namespace MWGui
|
||||||
return " (" + MyGUI::utility::toString(value) + ")";
|
return " (" + MyGUI::utility::toString(value) + ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string ToolTips::getSoulString(const MWWorld::CellRef& cellref)
|
||||||
|
{
|
||||||
|
std::string soul = cellref.getSoul();
|
||||||
|
if (soul.empty())
|
||||||
|
return std::string();
|
||||||
|
const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
|
||||||
|
const ESM::Creature *creature = store.get<ESM::Creature>().search(soul);
|
||||||
|
if (!creature)
|
||||||
|
return std::string();
|
||||||
|
if (creature->mName.empty())
|
||||||
|
return " (" + creature->mId + ")";
|
||||||
|
return " (" + creature->mName + ")";
|
||||||
|
}
|
||||||
|
|
||||||
std::string ToolTips::getCellRefString(const MWWorld::CellRef& cellref)
|
std::string ToolTips::getCellRefString(const MWWorld::CellRef& cellref)
|
||||||
{
|
{
|
||||||
std::string ret;
|
std::string ret;
|
||||||
|
|
|
@ -81,6 +81,9 @@ namespace MWGui
|
||||||
static std::string getCountString(const int value);
|
static std::string getCountString(const int value);
|
||||||
///< @return blank string if count is 1, or else " (value)"
|
///< @return blank string if count is 1, or else " (value)"
|
||||||
|
|
||||||
|
static std::string getSoulString(const MWWorld::CellRef& cellref);
|
||||||
|
///< Returns a string containing the name of the creature that the ID in the cellref's soul field belongs to.
|
||||||
|
|
||||||
static std::string getCellRefString(const MWWorld::CellRef& cellref);
|
static std::string getCellRefString(const MWWorld::CellRef& cellref);
|
||||||
///< Returns a string containing debug tooltip information about the given cellref.
|
///< Returns a string containing debug tooltip information about the given cellref.
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
#include "tradeitemmodel.hpp"
|
#include "tradeitemmodel.hpp"
|
||||||
#include "countdialog.hpp"
|
#include "countdialog.hpp"
|
||||||
#include "controllers.hpp"
|
#include "controllers.hpp"
|
||||||
|
#include "tooltips.hpp"
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
@ -201,7 +202,8 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
CountDialog* dialog = MWBase::Environment::get().getWindowManager()->getCountDialog();
|
CountDialog* dialog = MWBase::Environment::get().getWindowManager()->getCountDialog();
|
||||||
std::string message = "#{sQuanityMenuMessage02}";
|
std::string message = "#{sQuanityMenuMessage02}";
|
||||||
dialog->openCountDialog(object.getClass().getName(object), message, count);
|
std::string name = object.getClass().getName(object) + MWGui::ToolTips::getSoulString(object.getCellRef());
|
||||||
|
dialog->openCountDialog(name, message, count);
|
||||||
dialog->eventOkClicked.clear();
|
dialog->eventOkClicked.clear();
|
||||||
dialog->eventOkClicked += MyGUI::newDelegate(this, &TradeWindow::sellItem);
|
dialog->eventOkClicked += MyGUI::newDelegate(this, &TradeWindow::sellItem);
|
||||||
mItemToSell = mSortModel->mapToSource(index);
|
mItemToSell = mSortModel->mapToSource(index);
|
||||||
|
|
|
@ -43,6 +43,8 @@ namespace MWMechanics
|
||||||
x *= pickQuality * mFatigueTerm;
|
x *= pickQuality * mFatigueTerm;
|
||||||
x += fPickLockMult * lockStrength;
|
x += fPickLockMult * lockStrength;
|
||||||
|
|
||||||
|
MWBase::Environment::get().getMechanicsManager()->unlockAttempted(mActor, lock);
|
||||||
|
|
||||||
resultSound = "Open Lock Fail";
|
resultSound = "Open Lock Fail";
|
||||||
if (x <= 0)
|
if (x <= 0)
|
||||||
resultMessage = "#{sLockImpossible}";
|
resultMessage = "#{sLockImpossible}";
|
||||||
|
@ -59,7 +61,6 @@ namespace MWMechanics
|
||||||
resultMessage = "#{sLockFail}";
|
resultMessage = "#{sLockFail}";
|
||||||
}
|
}
|
||||||
|
|
||||||
MWBase::Environment::get().getMechanicsManager()->unlockAttempted(mActor, lock);
|
|
||||||
int uses = lockpick.getClass().getItemHealth(lockpick);
|
int uses = lockpick.getClass().getItemHealth(lockpick);
|
||||||
--uses;
|
--uses;
|
||||||
lockpick.getCellRef().setCharge(uses);
|
lockpick.getCellRef().setCharge(uses);
|
||||||
|
@ -84,6 +85,8 @@ namespace MWMechanics
|
||||||
x += fTrapCostMult * trapSpellPoints;
|
x += fTrapCostMult * trapSpellPoints;
|
||||||
x *= probeQuality * mFatigueTerm;
|
x *= probeQuality * mFatigueTerm;
|
||||||
|
|
||||||
|
MWBase::Environment::get().getMechanicsManager()->unlockAttempted(mActor, trap);
|
||||||
|
|
||||||
resultSound = "Disarm Trap Fail";
|
resultSound = "Disarm Trap Fail";
|
||||||
if (x <= 0)
|
if (x <= 0)
|
||||||
resultMessage = "#{sTrapImpossible}";
|
resultMessage = "#{sTrapImpossible}";
|
||||||
|
@ -101,7 +104,6 @@ namespace MWMechanics
|
||||||
resultMessage = "#{sTrapFail}";
|
resultMessage = "#{sTrapFail}";
|
||||||
}
|
}
|
||||||
|
|
||||||
MWBase::Environment::get().getMechanicsManager()->unlockAttempted(mActor, trap);
|
|
||||||
int uses = probe.getClass().getItemHealth(probe);
|
int uses = probe.getClass().getItemHealth(probe);
|
||||||
--uses;
|
--uses;
|
||||||
probe.getCellRef().setCharge(uses);
|
probe.getCellRef().setCharge(uses);
|
||||||
|
|
|
@ -709,6 +709,11 @@ namespace MWMechanics
|
||||||
}
|
}
|
||||||
else if (effectId == ESM::MagicEffect::Open)
|
else if (effectId == ESM::MagicEffect::Open)
|
||||||
{
|
{
|
||||||
|
if (!caster.isEmpty())
|
||||||
|
{
|
||||||
|
MWBase::Environment::get().getMechanicsManager()->unlockAttempted(getPlayer(), target);
|
||||||
|
// Use the player instead of the caster for vanilla crime compatibility
|
||||||
|
}
|
||||||
const MWWorld::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
const MWWorld::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
||||||
const ESM::MagicEffect *magiceffect = store.get<ESM::MagicEffect>().find(effectId);
|
const ESM::MagicEffect *magiceffect = store.get<ESM::MagicEffect>().find(effectId);
|
||||||
MWRender::Animation* animation = MWBase::Environment::get().getWorld()->getAnimation(target);
|
MWRender::Animation* animation = MWBase::Environment::get().getWorld()->getAnimation(target);
|
||||||
|
@ -726,11 +731,10 @@ namespace MWMechanics
|
||||||
target.getCellRef().unlock();
|
target.getCellRef().unlock();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
MWBase::Environment::get().getSoundManager()->playSound3D(target, "Open Lock Fail", 1.f, 1.f);
|
MWBase::Environment::get().getSoundManager()->playSound3D(target, "Open Lock Fail", 1.f, 1.f);
|
||||||
|
}
|
||||||
|
|
||||||
if (!caster.isEmpty())
|
|
||||||
MWBase::Environment::get().getMechanicsManager()->unlockAttempted(getPlayer(), target);
|
|
||||||
// Use the player instead of the caster for vanilla crime compatibility
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -457,7 +457,7 @@ namespace NifOsg
|
||||||
{
|
{
|
||||||
const Nif::NiLODNode* niLodNode = static_cast<const Nif::NiLODNode*>(nifNode);
|
const Nif::NiLODNode* niLodNode = static_cast<const Nif::NiLODNode*>(nifNode);
|
||||||
node = handleLodNode(niLodNode);
|
node = handleLodNode(niLodNode);
|
||||||
dataVariance = osg::Object::STATIC;
|
dataVariance = osg::Object::DYNAMIC;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Nif::RC_NiSwitchNode:
|
case Nif::RC_NiSwitchNode:
|
||||||
|
@ -476,8 +476,8 @@ namespace NifOsg
|
||||||
{
|
{
|
||||||
bool enabled = nifNode->flags & Nif::NiNode::Flag_ActiveCollision;
|
bool enabled = nifNode->flags & Nif::NiNode::Flag_ActiveCollision;
|
||||||
node = new CollisionSwitch(nifNode->trafo.toMatrix(), enabled);
|
node = new CollisionSwitch(nifNode->trafo.toMatrix(), enabled);
|
||||||
dataVariance = osg::Object::STATIC;
|
// This matrix transform must not be combined with another matrix transform.
|
||||||
|
dataVariance = osg::Object::DYNAMIC;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -215,7 +215,6 @@ private:
|
||||||
float mMinSize;
|
float mMinSize;
|
||||||
|
|
||||||
osg::ref_ptr<RootNode> mRootNode;
|
osg::ref_ptr<RootNode> mRootNode;
|
||||||
osg::ref_ptr<LodCallback> mLodCallback;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
QuadTreeWorld::QuadTreeWorld(osg::Group *parent, osg::Group *compileRoot, Resource::ResourceSystem *resourceSystem, Storage *storage, int compMapResolution, float compMapLevel, float lodFactor, int vertexLodMod, float maxCompGeometrySize)
|
QuadTreeWorld::QuadTreeWorld(osg::Group *parent, osg::Group *compileRoot, Resource::ResourceSystem *resourceSystem, Storage *storage, int compMapResolution, float compMapLevel, float lodFactor, int vertexLodMod, float maxCompGeometrySize)
|
||||||
|
|
|
@ -53,7 +53,7 @@ master_doc = 'index'
|
||||||
|
|
||||||
# General information about the project.
|
# General information about the project.
|
||||||
project = u'OpenMW'
|
project = u'OpenMW'
|
||||||
copyright = u'2017, OpenMW Team'
|
copyright = u'2020, OpenMW Team'
|
||||||
|
|
||||||
|
|
||||||
# The version info for the project you're documenting, acts as replacement for
|
# The version info for the project you're documenting, acts as replacement for
|
||||||
|
|
Loading…
Reference in a new issue