Merge pull request #661 from DreamWeave-MP/dw-fixes

Misc Downstream Fixes
master
David Cernat 1 year ago committed by GitHub
commit 25026c0a2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1860,17 +1860,14 @@ namespace MWMechanics
MWWorld::Ptr player = getPlayer();
const osg::Vec3f playerPos = player.getRefData().getPosition().asVec3();
bool hasHostiles = false; // need to know this to play Battle music
bool aiActive = MWBase::Environment::get().getMechanicsManager()->isAIActive();
if (aiActive)
{
for(PtrActorMap::iterator iter(mActors.begin()); iter != mActors.end(); ++iter)
{
if (iter->first == player) continue;
bool inProcessingRange = (playerPos - iter->first.getRefData().getPosition().asVec3()).length2() <= mActorsProcessingRange*mActorsProcessingRange;
if (inProcessingRange)
{
if (!inProcessingRange) continue;
MWMechanics::CreatureStats& stats = iter->first.getClass().getCreatureStats(iter->first);
if (!stats.isDead() && stats.getAiSequence().isInCombat())
{
@ -1878,8 +1875,6 @@ namespace MWMechanics
break;
}
}
}
}
// check if we still have any player enemies to switch music
static int currentMusic = 0;

@ -72,7 +72,7 @@ namespace mwmp
void GUIChat::acceptCommand(MyGUI::EditBox *_sender)
{
const std::string &cm = MyGUI::TextIterator::toTagsString(mCommandLine->getCaption());
const std::string &cm = mCommandLine->getOnlyText();
// If they enter nothing, then it should be canceled.
// Otherwise, there's no way of closing without having text.

@ -783,7 +783,7 @@ void ObjectList::rotateObjects(MWWorld::CellStore* cellStore)
ptrFound.getCellRef().getRefNum(), ptrFound.getCellRef().getMpNum());
MWBase::Environment::get().getWorld()->rotateObject(ptrFound,
baseObject.position.rot[0], baseObject.position.rot[1], baseObject.position.rot[2]);
baseObject.position.rot[0], baseObject.position.rot[1], baseObject.position.rot[2], MWBase::RotationFlag_none);
}
}
}

Loading…
Cancel
Save