forked from mirror/openmw-tes3mp
Merge branch 'master' of https://github.com/zinnschlag/openmw
This commit is contained in:
commit
071dd1e437
5 changed files with 59 additions and 37 deletions
|
@ -442,8 +442,6 @@ void OMW::Engine::go()
|
|||
if (!mStartupScript.empty())
|
||||
MWBase::Environment::get().getWindowManager()->executeInConsole (mStartupScript);
|
||||
|
||||
std::cout << "\nPress Q/ESC or close window to exit.\n";
|
||||
|
||||
// Start the main rendering loop
|
||||
mOgre->start();
|
||||
|
||||
|
|
|
@ -206,7 +206,9 @@ void CharacterCreation::spawnDialog(const char id)
|
|||
mRaceDialog->setRaceId(mPlayerRaceId);
|
||||
mRaceDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onRaceDialogDone);
|
||||
mRaceDialog->eventBack += MyGUI::newDelegate(this, &CharacterCreation::onRaceDialogBack);
|
||||
mRaceDialog->setVisible(true);;
|
||||
mRaceDialog->setVisible(true);
|
||||
if (mCreationStage < CSE_NameChosen)
|
||||
mCreationStage = CSE_NameChosen;
|
||||
break;
|
||||
|
||||
case GM_Class:
|
||||
|
@ -215,6 +217,8 @@ void CharacterCreation::spawnDialog(const char id)
|
|||
mClassChoiceDialog = new ClassChoiceDialog(*mWM);
|
||||
mClassChoiceDialog->eventButtonSelected += MyGUI::newDelegate(this, &CharacterCreation::onClassChoice);
|
||||
mClassChoiceDialog->setVisible(true);
|
||||
if (mCreationStage < CSE_RaceChosen)
|
||||
mCreationStage = CSE_RaceChosen;
|
||||
break;
|
||||
|
||||
case GM_ClassPick:
|
||||
|
@ -226,6 +230,8 @@ void CharacterCreation::spawnDialog(const char id)
|
|||
mPickClassDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onPickClassDialogDone);
|
||||
mPickClassDialog->eventBack += MyGUI::newDelegate(this, &CharacterCreation::onPickClassDialogBack);
|
||||
mPickClassDialog->setVisible(true);
|
||||
if (mCreationStage < CSE_RaceChosen)
|
||||
mCreationStage = CSE_RaceChosen;
|
||||
break;
|
||||
|
||||
case GM_Birth:
|
||||
|
@ -237,6 +243,8 @@ void CharacterCreation::spawnDialog(const char id)
|
|||
mBirthSignDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onBirthSignDialogDone);
|
||||
mBirthSignDialog->eventBack += MyGUI::newDelegate(this, &CharacterCreation::onBirthSignDialogBack);
|
||||
mBirthSignDialog->setVisible(true);
|
||||
if (mCreationStage < CSE_ClassChosen)
|
||||
mCreationStage = CSE_ClassChosen;
|
||||
break;
|
||||
|
||||
case GM_ClassCreate:
|
||||
|
@ -247,6 +255,8 @@ void CharacterCreation::spawnDialog(const char id)
|
|||
mCreateClassDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onCreateClassDialogDone);
|
||||
mCreateClassDialog->eventBack += MyGUI::newDelegate(this, &CharacterCreation::onCreateClassDialogBack);
|
||||
mCreateClassDialog->setVisible(true);
|
||||
if (mCreationStage < CSE_RaceChosen)
|
||||
mCreationStage = CSE_RaceChosen;
|
||||
break;
|
||||
case GM_ClassGenerate:
|
||||
mGenerateClassStep = 0;
|
||||
|
@ -255,6 +265,8 @@ void CharacterCreation::spawnDialog(const char id)
|
|||
mGenerateClassSpecializations[1] = 0;
|
||||
mGenerateClassSpecializations[2] = 0;
|
||||
showClassQuestionDialog();
|
||||
if (mCreationStage < CSE_RaceChosen)
|
||||
mCreationStage = CSE_RaceChosen;
|
||||
break;
|
||||
case GM_Review:
|
||||
mWM->removeDialog(mReviewDialog);
|
||||
|
@ -292,6 +304,8 @@ void CharacterCreation::spawnDialog(const char id)
|
|||
mReviewDialog->eventBack += MyGUI::newDelegate(this, &CharacterCreation::onReviewDialogBack);
|
||||
mReviewDialog->eventActivateDialog += MyGUI::newDelegate(this, &CharacterCreation::onReviewActivateDialog);
|
||||
mReviewDialog->setVisible(true);
|
||||
if (mCreationStage < CSE_BirthSignChosen)
|
||||
mCreationStage = CSE_BirthSignChosen;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1188,6 +1188,9 @@ namespace MWWorld
|
|||
pos.pos[0] = result.second[0];
|
||||
pos.pos[1] = result.second[1];
|
||||
pos.pos[2] = result.second[2];
|
||||
// We want only the Z part of the player's rotation
|
||||
pos.rot[0] = 0;
|
||||
pos.rot[1] = 0;
|
||||
|
||||
Ptr dropped = copyObjectToCell(object, *cell, pos);
|
||||
PCDropped(dropped);
|
||||
|
@ -1242,6 +1245,9 @@ namespace MWWorld
|
|||
|
||||
ESM::Position pos =
|
||||
actor.getRefData().getPosition();
|
||||
// We want only the Z part of the actor's rotation
|
||||
pos.rot[0] = 0;
|
||||
pos.rot[1] = 0;
|
||||
|
||||
Ogre::Vector3 orig =
|
||||
Ogre::Vector3(pos.pos[0], pos.pos[1], pos.pos[2]);
|
||||
|
|
|
@ -11,66 +11,66 @@ namespace Interpreter
|
|||
class OpReturn : public Opcode0
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
virtual void execute (Runtime& runtime)
|
||||
{
|
||||
runtime.setPC (-1);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class OpSkipZero : public Opcode0
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
virtual void execute (Runtime& runtime)
|
||||
{
|
||||
Type_Integer data = runtime[0].mInteger;
|
||||
runtime.pop();
|
||||
|
||||
|
||||
if (data==0)
|
||||
runtime.setPC (runtime.getPC()+1);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
class OpSkipNonZero : public Opcode0
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
virtual void execute (Runtime& runtime)
|
||||
{
|
||||
Type_Integer data = runtime[0].mInteger;
|
||||
runtime.pop();
|
||||
|
||||
|
||||
if (data!=0)
|
||||
runtime.setPC (runtime.getPC()+1);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
class OpJumpForward : public Opcode1
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
virtual void execute (Runtime& runtime, unsigned int arg0)
|
||||
{
|
||||
if (arg0==0)
|
||||
throw std::logic_error ("inifite loop");
|
||||
|
||||
throw std::logic_error ("infinite loop");
|
||||
|
||||
runtime.setPC (runtime.getPC()+arg0-1);
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
class OpJumpBackward : public Opcode1
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
virtual void execute (Runtime& runtime, unsigned int arg0)
|
||||
{
|
||||
if (arg0==0)
|
||||
throw std::logic_error ("inifite loop");
|
||||
|
||||
throw std::logic_error ("infinite loop");
|
||||
|
||||
runtime.setPC (runtime.getPC()-arg0-1);
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -25,7 +25,8 @@ http://www.gnu.org/licenses/ .
|
|||
|
||||
#include <cstdio>
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include <components/misc/stringops.hpp>
|
||||
|
||||
#include "../nif/niffile.hpp"
|
||||
#include "../nif/node.hpp"
|
||||
|
@ -188,7 +189,7 @@ void ManualBulletShapeLoader::handleNode(btTriangleMesh* mesh, const Nif::Node *
|
|||
// Marker objects: no collision
|
||||
/// \todo don't do this in the editor
|
||||
std::string nodename = node->name;
|
||||
boost::algorithm::to_lower(nodename);
|
||||
Misc::StringUtils::toLower(nodename);
|
||||
if (nodename.find("marker") != std::string::npos)
|
||||
{
|
||||
return;
|
||||
|
@ -222,16 +223,19 @@ void ManualBulletShapeLoader::handleNode(btTriangleMesh* mesh, const Nif::Node *
|
|||
}
|
||||
}
|
||||
|
||||
if(node->hasBounds)
|
||||
if (isCollisionNode || (!hasCollisionNode && !raycasting))
|
||||
{
|
||||
cShape->mBoxTranslation = node->boundPos;
|
||||
cShape->mBoxRotation = node->boundRot;
|
||||
mBoundingBox = new btBoxShape(getbtVector(node->boundXYZ));
|
||||
}
|
||||
else if( (isCollisionNode || (!hasCollisionNode && !raycasting)) && node->recType == Nif::RC_NiTriShape)
|
||||
{
|
||||
cShape->mCollide = !(flags&0x800);
|
||||
handleNiTriShape(mesh, static_cast<const Nif::NiTriShape*>(node), flags, node->getWorldTransform(), raycasting);
|
||||
if(node->hasBounds)
|
||||
{
|
||||
cShape->mBoxTranslation = node->boundPos;
|
||||
cShape->mBoxRotation = node->boundRot;
|
||||
mBoundingBox = new btBoxShape(getbtVector(node->boundXYZ));
|
||||
}
|
||||
else if(node->recType == Nif::RC_NiTriShape)
|
||||
{
|
||||
cShape->mCollide = !(flags&0x800);
|
||||
handleNiTriShape(mesh, static_cast<const Nif::NiTriShape*>(node), flags, node->getWorldTransform(), raycasting);
|
||||
}
|
||||
}
|
||||
|
||||
// For NiNodes, loop through children
|
||||
|
|
Loading…
Reference in a new issue