mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-05-01 14:27:59 +03:00
Merge remote-tracking branch 'scrawl/master'
This commit is contained in:
commit
89beecad8c
24 changed files with 72 additions and 126 deletions
|
@ -13,6 +13,7 @@ namespace ESM
|
|||
|
||||
void AIPackageList::load(ESMReader &esm)
|
||||
{
|
||||
mList.clear();
|
||||
while (esm.hasMoreSubs()) {
|
||||
// initialize every iteration
|
||||
AIPackage pack;
|
||||
|
|
|
@ -7,6 +7,7 @@ namespace ESM {
|
|||
|
||||
void EffectList::load(ESMReader &esm)
|
||||
{
|
||||
mList.clear();
|
||||
ENAMstruct s;
|
||||
while (esm.isNextSub("ENAM")) {
|
||||
esm.getHT(s, 24);
|
||||
|
|
|
@ -9,6 +9,7 @@ namespace ESM
|
|||
|
||||
void PartReferenceList::load(ESMReader &esm)
|
||||
{
|
||||
mParts.clear();
|
||||
while (esm.isNextSub("INDX"))
|
||||
{
|
||||
PartReference pr;
|
||||
|
|
|
@ -9,6 +9,7 @@ namespace ESM
|
|||
|
||||
void InventoryList::load(ESMReader &esm)
|
||||
{
|
||||
mList.clear();
|
||||
ContItem ci;
|
||||
while (esm.isNextSub("NPCO"))
|
||||
{
|
||||
|
|
|
@ -51,6 +51,7 @@ void NPC::load(ESMReader &esm)
|
|||
else
|
||||
mHasAI = false;
|
||||
|
||||
mTransport.clear();
|
||||
while (esm.isNextSub("DODT") || esm.isNextSub("DNAM")) {
|
||||
if (esm.retSubName() == 0x54444f44) { // DODT struct
|
||||
Dest dodt;
|
||||
|
|
|
@ -27,6 +27,9 @@ void Pathgrid::load(ESMReader &esm)
|
|||
esm.getHNT(mData, "DATA", 12);
|
||||
mCell = esm.getHNString("NAME");
|
||||
|
||||
mPoints.clear();
|
||||
mEdges.clear();
|
||||
|
||||
// keep track of total connections so we can reserve edge vector size
|
||||
int edgeCount = 0;
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@ void Region::load(ESMReader &esm)
|
|||
|
||||
esm.getHNT(mMapColor, "CNAM");
|
||||
|
||||
mSoundList.clear();
|
||||
while (esm.hasMoreSubs())
|
||||
{
|
||||
SoundRef sr;
|
||||
|
|
|
@ -22,6 +22,8 @@ void Script::load(ESMReader &esm)
|
|||
mData = data.mData;
|
||||
mId = data.mName.toString();
|
||||
|
||||
mVarNames.clear();
|
||||
|
||||
// List of local variables
|
||||
if (esm.isNextSub("SCVR"))
|
||||
{
|
||||
|
|
|
@ -7,6 +7,7 @@ namespace ESM {
|
|||
|
||||
void SpellList::load(ESMReader &esm)
|
||||
{
|
||||
mList.clear();
|
||||
while (esm.isNextSub("NPCS")) {
|
||||
mList.push_back(esm.getHString());
|
||||
}
|
||||
|
|
|
@ -1063,11 +1063,11 @@ class NIFObjectLoader
|
|||
|
||||
static void createObjects(const Nif::NIFFilePtr& nif, const std::string &name, const std::string &group,
|
||||
Ogre::SceneNode *sceneNode, const Nif::Node *node,
|
||||
ObjectScenePtr scene, int flags, int animflags, int partflags)
|
||||
ObjectScenePtr scene, int flags, int animflags, int partflags, bool isRootCollisionNode=false)
|
||||
{
|
||||
// Do not create objects for the collision shape (includes all children)
|
||||
if(node->recType == Nif::RC_RootCollisionNode)
|
||||
return;
|
||||
isRootCollisionNode = true;
|
||||
|
||||
// Marker objects: just skip the entire node branch
|
||||
/// \todo don't do this in the editor
|
||||
|
@ -1120,20 +1120,23 @@ class NIFObjectLoader
|
|||
if(!node->controller.empty())
|
||||
createNodeControllers(nif, name, node->controller, scene, animflags);
|
||||
|
||||
if(node->recType == Nif::RC_NiCamera)
|
||||
if (!isRootCollisionNode)
|
||||
{
|
||||
/* Ignored */
|
||||
}
|
||||
if(node->recType == Nif::RC_NiCamera)
|
||||
{
|
||||
/* Ignored */
|
||||
}
|
||||
|
||||
if(node->recType == Nif::RC_NiTriShape && !(flags&0x80000000))
|
||||
{
|
||||
createEntity(name, group, sceneNode->getCreator(), scene, node, flags, animflags);
|
||||
}
|
||||
if(node->recType == Nif::RC_NiTriShape && !(flags&0x80000000))
|
||||
{
|
||||
createEntity(name, group, sceneNode->getCreator(), scene, node, flags, animflags);
|
||||
}
|
||||
|
||||
if((node->recType == Nif::RC_NiAutoNormalParticles ||
|
||||
node->recType == Nif::RC_NiRotatingParticles) && !(flags&0x40000000))
|
||||
{
|
||||
createParticleSystem(name, group, sceneNode, scene, node, flags, partflags, animflags);
|
||||
if((node->recType == Nif::RC_NiAutoNormalParticles ||
|
||||
node->recType == Nif::RC_NiRotatingParticles) && !(flags&0x40000000))
|
||||
{
|
||||
createParticleSystem(name, group, sceneNode, scene, node, flags, partflags, animflags);
|
||||
}
|
||||
}
|
||||
|
||||
const Nif::NiNode *ninode = dynamic_cast<const Nif::NiNode*>(node);
|
||||
|
@ -1143,7 +1146,7 @@ class NIFObjectLoader
|
|||
for(size_t i = 0;i < children.length();i++)
|
||||
{
|
||||
if(!children[i].empty())
|
||||
createObjects(nif, name, group, sceneNode, children[i].getPtr(), scene, flags, animflags, partflags);
|
||||
createObjects(nif, name, group, sceneNode, children[i].getPtr(), scene, flags, animflags, partflags, isRootCollisionNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -216,7 +216,8 @@ namespace OgreInit
|
|||
Files::loadOgrePlugin(pluginDir, "RenderSystem_GL3Plus", *mRoot);
|
||||
Files::loadOgrePlugin(pluginDir, "RenderSystem_Direct3D9", *mRoot);
|
||||
Files::loadOgrePlugin(pluginDir, "Plugin_CgProgramManager", *mRoot);
|
||||
Files::loadOgrePlugin(pluginDir, "Plugin_ParticleFX", *mRoot);
|
||||
if (!Files::loadOgrePlugin(pluginDir, "Plugin_ParticleFX", *mRoot))
|
||||
throw std::runtime_error("Required Plugin_ParticleFX for Ogre not found!");
|
||||
}
|
||||
|
||||
void OgreInit::loadParticleFactories()
|
||||
|
|
|
@ -42,4 +42,4 @@ bool loadOgrePlugin(const std::string &pluginDir, std::string pluginName, Ogre::
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue