Merge branch 'master' of https://github.com/OpenMW/openmw into newgame

deque
scrawl 11 years ago
commit 2f6d400c62

@ -12,7 +12,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/)
message(STATUS "Configuring OpenMW...")
set(OPENMW_VERSION_MAJOR 0)
set(OPENMW_VERSION_MINOR 29)
set(OPENMW_VERSION_MINOR 30)
set(OPENMW_VERSION_RELEASE 0)
set(OPENMW_VERSION_COMMITHASH "")

@ -86,8 +86,11 @@ namespace CSVRender
}
std::stringstream windowHandle;
#ifdef WIN32
windowHandle << Ogre::StringConverter::toString((unsigned long)(this->winId()));
#else
windowHandle << this->winId();
#endif
std::stringstream windowTitle;
static int count=0;
windowTitle << ++count;

@ -141,17 +141,34 @@ void AiSequence::execute (const MWWorld::Ptr& actor,float duration)
{
if ((*it)->getTypeId() != AiPackage::TypeIdCombat) break;
ESM::Position &targetPos = static_cast<const AiCombat *>(*it)->getTarget().getRefData().getPosition();
MWWorld::Ptr target = static_cast<const AiCombat *>(*it)->getTarget();
float distTo = (Ogre::Vector3(targetPos.pos) - vActorPos).length();
if (distTo < nearestDist)
// target disappeared (e.g. summoned creatures)
if (target.isEmpty())
{
nearestDist = distTo;
itActualCombat = it;
delete *it;
mPackages.erase(it++);
}
else
{
ESM::Position &targetPos = target.getRefData().getPosition();
float distTo = (Ogre::Vector3(targetPos.pos) - vActorPos).length();
if (distTo < nearestDist)
{
nearestDist = distTo;
itActualCombat = it;
}
}
}
if (mPackages.begin() != itActualCombat)
// all targets disappeared
if (nearestDist == std::numeric_limits<float>::max())
{
mDone = true;
return;
}
else if (mPackages.begin() != itActualCombat)
{
// move combat package with nearest target to the front
mPackages.splice(mPackages.begin(), mPackages, itActualCombat);

@ -3,7 +3,7 @@ OpenMW: A reimplementation of The Elder Scrolls III: Morrowind
OpenMW is an attempt at recreating the engine for the popular role-playing game
Morrowind by Bethesda Softworks. You need to own and install the original game for OpenMW to work.
Version: 0.29.0
Version: 0.30.0
License: GPL (see GPL3.txt for more information)
Website: http://www.openmw.org

Loading…
Cancel
Save