1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-30 09:15:38 +00:00

Load NiControllerManager

This commit is contained in:
Alexei Dobrohotov 2021-11-10 19:42:55 +03:00
parent 41097352a8
commit 923756b407
4 changed files with 18 additions and 1 deletions

View file

@ -270,6 +270,15 @@ namespace Nif
nif->getUInt(); // Zero
}
void NiControllerManager::read(NIFStream *nif)
{
Controller::read(nif);
cumulative = nif->getBoolean();
unsigned int numSequences = nif->getUInt();
nif->skip(4 * numSequences); // Controller sequences
nif->skip(4); // Object palette
}
void NiPoint3Interpolator::read(NIFStream *nif)
{
defaultVal = nif->getVector3();

View file

@ -184,6 +184,12 @@ struct bhkBlendController : public Controller
void read(NIFStream *nif) override;
};
struct NiControllerManager : public Controller
{
bool cumulative;
void read(NIFStream *nif) override;
};
struct Interpolator : public Record { };
struct NiPoint3Interpolator : public Interpolator

View file

@ -140,6 +140,7 @@ static std::map<std::string,RecordFactoryEntry> makeFactory()
factory["NiCollisionObject"] = {&construct <NiCollisionObject> , RC_NiCollisionObject };
factory["bhkCollisionObject"] = {&construct <bhkCollisionObject> , RC_bhkCollisionObject };
factory["BSDismemberSkinInstance"] = {&construct <BSDismemberSkinInstance> , RC_BSDismemberSkinInstance };
factory["NiControllerManager"] = {&construct <NiControllerManager> , RC_NiControllerManager };
return factory;
}

View file

@ -129,7 +129,8 @@ enum RecordType
RC_BSFurnitureMarker,
RC_NiCollisionObject,
RC_bhkCollisionObject,
RC_BSDismemberSkinInstance
RC_BSDismemberSkinInstance,
RC_NiControllerManager
};
/// Base class for all records