diff --git a/apps/openmw/mwmechanics/actors.cpp b/apps/openmw/mwmechanics/actors.cpp index 0bf28e47d..d260b8284 100644 --- a/apps/openmw/mwmechanics/actors.cpp +++ b/apps/openmw/mwmechanics/actors.cpp @@ -1860,24 +1860,19 @@ 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) { - for(PtrActorMap::iterator iter(mActors.begin()); iter != mActors.end(); ++iter) - { - if (iter->first == player) continue; + if (iter->first == player) continue; - bool inProcessingRange = (playerPos - iter->first.getRefData().getPosition().asVec3()).length2() <= mActorsProcessingRange*mActorsProcessingRange; - if (inProcessingRange) - { - MWMechanics::CreatureStats& stats = iter->first.getClass().getCreatureStats(iter->first); - if (!stats.isDead() && stats.getAiSequence().isInCombat()) - { - hasHostiles = true; - break; - } - } + bool inProcessingRange = (playerPos - iter->first.getRefData().getPosition().asVec3()).length2() <= mActorsProcessingRange*mActorsProcessingRange; + if (!inProcessingRange) continue; + + MWMechanics::CreatureStats& stats = iter->first.getClass().getCreatureStats(iter->first); + if (!stats.isDead() && stats.getAiSequence().isInCombat()) + { + hasHostiles = true; + break; } } diff --git a/apps/openmw/mwmp/GUI/GUIChat.cpp b/apps/openmw/mwmp/GUI/GUIChat.cpp index 9cfa44482..2019dde7b 100644 --- a/apps/openmw/mwmp/GUI/GUIChat.cpp +++ b/apps/openmw/mwmp/GUI/GUIChat.cpp @@ -72,8 +72,8 @@ 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. if (cm.empty()) @@ -97,7 +97,7 @@ namespace mwmp // during the actual command execution mCommandLine->setCaption(""); setEditState(false); - send (cm); + send(cm); } void GUIChat::onResChange(int width, int height) diff --git a/apps/openmw/mwmp/ObjectList.cpp b/apps/openmw/mwmp/ObjectList.cpp index 8136f9377..7d766c8b3 100644 --- a/apps/openmw/mwmp/ObjectList.cpp +++ b/apps/openmw/mwmp/ObjectList.cpp @@ -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); } } }