Merge remote-tracking branch 'upstream/openmw-35' into HEAD

Conflicts:
	apps/openmw/mwmechanics/npcstats.cpp
celladd
scrawl 10 years ago
commit e81d2a9dde

@ -371,8 +371,6 @@ configure_file(${OpenMW_SOURCE_DIR}/files/opencs/defaultfilters
if (NOT WIN32 AND NOT APPLE)
configure_file(${OpenMW_SOURCE_DIR}/files/openmw.desktop
"${OpenMW_BINARY_DIR}/openmw.desktop")
configure_file(${OpenMW_SOURCE_DIR}/files/openmw-mimeinfo.xml
"${OpenMW_BINARY_DIR}/openmw-mimeinfo.xml")
configure_file(${OpenMW_SOURCE_DIR}/files/openmw-cs.desktop
"${OpenMW_BINARY_DIR}/openmw-cs.desktop")
endif()
@ -441,7 +439,6 @@ IF(NOT WIN32 AND NOT APPLE)
# Install icon and desktop file
INSTALL(FILES "${OpenMW_BINARY_DIR}/openmw.desktop" DESTINATION "${DATAROOTDIR}/applications" PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ COMPONENT "openmw")
INSTALL(FILES "${OpenMW_BINARY_DIR}/openmw-mimeinfo.xml" DESTINATION "${DATAROOTDIR}/mime/packages" PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ COMPONENT "openmw")
INSTALL(FILES "${OpenMW_SOURCE_DIR}/files/launcher/images/openmw.png" DESTINATION "${ICONDIR}" PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ COMPONENT "openmw")
IF(BUILD_OPENCS)
INSTALL(FILES "${OpenMW_BINARY_DIR}/openmw-cs.desktop" DESTINATION "${DATAROOTDIR}/applications" PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ COMPONENT "opencs")
@ -761,7 +758,7 @@ if (APPLE)
set(OPENMW_APP "\${CMAKE_INSTALL_PREFIX}/${INSTALL_SUBDIR}/${APP_BUNDLE_NAME}")
set(OPENCS_BUNDLE_NAME "OpenCS.app")
set(OPENCS_BUNDLE_NAME "OpenMW-CS.app")
set(OPENCS_APP "\${CMAKE_INSTALL_PREFIX}/${INSTALL_SUBDIR}/${OPENCS_BUNDLE_NAME}")
set(ABSOLUTE_PLUGINS "")

@ -211,5 +211,5 @@ target_link_libraries(openmw-cs
)
if(APPLE)
INSTALL(TARGETS openmw-cs BUNDLE DESTINATION OpenMW-CS COMPONENT BUNDLE)
INSTALL(TARGETS openmw-cs BUNDLE DESTINATION OpenMW COMPONENT BUNDLE)
endif()

@ -125,6 +125,21 @@ bool MWMechanics::NpcStats::isInFaction (const std::string& faction) const
return (mFactionRank.find(Misc::StringUtils::lowerCase(faction)) != mFactionRank.end());
}
int MWMechanics::NpcStats::getFactionReputation (const std::string& faction) const
{
std::map<std::string, int>::const_iterator iter = mFactionReputation.find (Misc::StringUtils::lowerCase(faction));
if (iter==mFactionReputation.end())
return 0;
return iter->second;
}
void MWMechanics::NpcStats::setFactionReputation (const std::string& faction, int value)
{
mFactionReputation[Misc::StringUtils::lowerCase(faction)] = value;
}
float MWMechanics::NpcStats::getSkillProgressRequirement (int skillIndex, const ESM::Class& class_) const
{
float progressRequirement = 1 + getSkill (skillIndex).getBase();
@ -327,21 +342,6 @@ void MWMechanics::NpcStats::setBounty (int bounty)
mBounty = bounty;
}
int MWMechanics::NpcStats::getFactionReputation (const std::string& faction) const
{
std::map<std::string, int>::const_iterator iter = mFactionReputation.find (faction);
if (iter==mFactionReputation.end())
return 0;
return iter->second;
}
void MWMechanics::NpcStats::setFactionReputation (const std::string& faction, int value)
{
mFactionReputation[faction] = value;
}
int MWMechanics::NpcStats::getReputation() const
{
return mReputation;
@ -513,7 +513,7 @@ void MWMechanics::NpcStats::readState (const ESM::NpcStats& state)
mFactionRank[iter->first] = iter->second.mRank;
if (iter->second.mReputation)
mFactionReputation[iter->first] = iter->second.mReputation;
mFactionReputation[Misc::StringUtils::lowerCase(iter->first)] = iter->second.mReputation;
}
mDisposition = state.mDisposition;

@ -297,6 +297,8 @@ void RenderingManager::rotateObject(const MWWorld::Ptr &ptr)
void
RenderingManager::updateObjectCell(const MWWorld::Ptr &old, const MWWorld::Ptr &cur)
{
if (!old.getRefData().getBaseNode())
return;
Ogre::SceneNode *child =
mRendering.getScene()->getSceneNode(old.getRefData().getHandle());

@ -723,9 +723,9 @@ namespace MWSound
MWWorld::Ptr player =
MWBase::Environment::get().getWorld()->getPlayerPtr();
const ESM::Cell *cell = player.getCell()->getCell();
const MWWorld::CellStore *cell = player.getCell();
mListenerUnderwater = ((cell->mData.mFlags&cell->HasWater) && mListenerPos.z < cell->mWater);
mListenerUnderwater = ((cell->getCell()->mData.mFlags&ESM::Cell::HasWater) && mListenerPos.z < cell->getWaterLevel());
}
void SoundManager::updatePtr(const MWWorld::Ptr &old, const MWWorld::Ptr &updated)

@ -241,26 +241,30 @@ MWWorld::Ptr MWWorld::Cells::getPtr (const std::string& name)
void MWWorld::Cells::getExteriorPtrs(const std::string &name, std::vector<MWWorld::Ptr> &out)
{
for (std::map<std::pair<int, int>, CellStore>::iterator iter = mExteriors.begin();
iter!=mExteriors.end(); ++iter)
const MWWorld::Store<ESM::Cell> &cells = mStore.get<ESM::Cell>();
for (MWWorld::Store<ESM::Cell>::iterator iter = cells.extBegin(); iter != cells.extEnd(); ++iter)
{
Ptr ptr = getPtrAndCache (name, iter->second);
CellStore *cellStore = getCellStore (&(*iter));
Ptr ptr = getPtrAndCache (name, *cellStore);
if (!ptr.isEmpty())
out.push_back(ptr);
}
}
void MWWorld::Cells::getInteriorPtrs(const std::string &name, std::vector<MWWorld::Ptr> &out)
{
for (std::map<std::string, CellStore>::iterator iter = mInteriors.begin();
iter!=mInteriors.end(); ++iter)
const MWWorld::Store<ESM::Cell> &cells = mStore.get<ESM::Cell>();
for (MWWorld::Store<ESM::Cell>::iterator iter = cells.intBegin(); iter != cells.intEnd(); ++iter)
{
Ptr ptr = getPtrAndCache (name, iter->second);
CellStore *cellStore = getCellStore (&(*iter));
Ptr ptr = getPtrAndCache (name, *cellStore);
if (!ptr.isEmpty())
out.push_back(ptr);
}
}
int MWWorld::Cells::countSavedGameRecords() const

@ -862,9 +862,9 @@ namespace MWWorld
for(;iter != mMovementQueue.end();++iter)
{
float waterlevel = -std::numeric_limits<float>::max();
const ESM::Cell *cell = iter->first.getCell()->getCell();
if(cell->hasWater())
waterlevel = cell->mWater;
const MWWorld::CellStore *cell = iter->first.getCell();
if(cell->getCell()->hasWater())
waterlevel = cell->getWaterLevel();
float oldHeight = iter->first.getRefData().getPosition().pos[2];
@ -872,7 +872,7 @@ namespace MWWorld
bool waterCollision = false;
if (effects.get(ESM::MagicEffect::WaterWalking).getMagnitude()
&& cell->hasWater()
&& cell->getCell()->hasWater()
&& !world->isUnderwater(iter->first.getCell(),
Ogre::Vector3(iter->first.getRefData().getPosition().pos)))
waterCollision = true;

@ -1,11 +0,0 @@
<?xml version="1.0"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
<mime-type type="application/x-openmw-savegame">
<icon name="openmw" />
<generic-icon name="applications-games"/>
<comment>OpenMW Savegame</comment>
<glob weight="60" pattern="*.omwsave"/>
</mime-type>
</mime-info>

@ -8,16 +8,3 @@ TryExec=openmw-launcher
Exec=openmw-launcher
Icon=openmw
Categories=Game;RolePlaying;
[Desktop Entry]
Type=Application
Name=OpenMW
GenericName=Role Playing Game
Comment=An engine replacement for The Elder Scrolls III: Morrowind
Keywords=Morrowind;Reimplementation Mods;esm;bsa;
Exec=openmw --load-savegame=%f
Icon=openmw
Categories=Game;RolePlaying;
Terminal=false
NoDisplay=true
MimeType=application/x-openmw-savegame;

Loading…
Cancel
Save