mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-07-12 17:21:42 +00:00
Merge pull request #661 from DreamWeave-MP/dw-fixes
Misc Downstream Fixes
This commit is contained in:
commit
25026c0a2c
3 changed files with 14 additions and 19 deletions
|
@ -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.
|
||||
|
@ -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)
|
||||
|
|
|
@ -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…
Reference in a new issue