mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-23 04:26:31 -04:00
Merge pull request #661 from DreamWeave-MP/dw-fixes
Misc Downstream Fixes
This commit is contained in:
commit
25026c0a2c
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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…
x
Reference in New Issue
Block a user