Merge branch 'helgenkeepcalm' into 'master'

NIF additions relevant to Helgen Keep

See merge request OpenMW/openmw!3252
revert-6246b479
psi29a 1 year ago
commit 686281d276

@ -138,4 +138,12 @@ namespace Nif
mRotation = osg::Quat(rotX, osg::X_AXIS, rotY, osg::Y_AXIS, rotZ, osg::Z_AXIS); mRotation = osg::Quat(rotX, osg::X_AXIS, rotY, osg::Y_AXIS, rotZ, osg::Z_AXIS);
} }
void BSBehaviorGraphExtraData::read(NIFStream* nif)
{
Extra::read(nif);
mFile = nif->getString();
mControlsBaseSkeleton = nif->getBoolean();
}
} }

@ -154,5 +154,13 @@ namespace Nif
void read(NIFStream* nif) override; void read(NIFStream* nif) override;
}; };
struct BSBehaviorGraphExtraData : public Extra
{
std::string mFile;
bool mControlsBaseSkeleton;
void read(NIFStream* nif) override;
};
} // Namespace } // Namespace
#endif #endif

@ -145,9 +145,13 @@ namespace Nif
{ "BSValueNode", &construct<BSValueNode, RC_NiNode> }, { "BSValueNode", &construct<BSValueNode, RC_NiNode> },
{ "BSOrderedNode", &construct<BSOrderedNode, RC_NiNode> }, { "BSOrderedNode", &construct<BSOrderedNode, RC_NiNode> },
{ "BSMultiBoundNode", &construct<BSMultiBoundNode, RC_NiNode> }, { "BSMultiBoundNode", &construct<BSMultiBoundNode, RC_NiNode> },
{ "BSRangeNode", &construct<BSRangeNode, RC_NiNode> },
{ "BSBlastNode", &construct<BSRangeNode, RC_NiNode> },
{ "BSDamageStage", &construct<BSRangeNode, RC_NiNode> },
{ "bhkBlendController", &construct<bhkBlendController, RC_bhkBlendController> }, { "bhkBlendController", &construct<bhkBlendController, RC_bhkBlendController> },
{ "NiFloatInterpolator", &construct<NiFloatInterpolator, RC_NiFloatInterpolator> }, { "NiFloatInterpolator", &construct<NiFloatInterpolator, RC_NiFloatInterpolator> },
{ "NiBoolInterpolator", &construct<NiBoolInterpolator, RC_NiBoolInterpolator> }, { "NiBoolInterpolator", &construct<NiBoolInterpolator, RC_NiBoolInterpolator> },
{ "NiBoolTimelineInterpolator", &construct<NiBoolInterpolator, RC_NiBoolTimelineInterpolator> },
{ "NiPoint3Interpolator", &construct<NiPoint3Interpolator, RC_NiPoint3Interpolator> }, { "NiPoint3Interpolator", &construct<NiPoint3Interpolator, RC_NiPoint3Interpolator> },
{ "NiTransformController", &construct<NiKeyframeController, RC_NiKeyframeController> }, { "NiTransformController", &construct<NiKeyframeController, RC_NiKeyframeController> },
{ "NiMultiTargetTransformController", { "NiMultiTargetTransformController",
@ -209,6 +213,9 @@ namespace Nif
&construct<BSEffectShaderPropertyFloatController, RC_BSLightingShaderPropertyFloatController> }, &construct<BSEffectShaderPropertyFloatController, RC_BSLightingShaderPropertyFloatController> },
{ "BSEffectShaderPropertyColorController", { "BSEffectShaderPropertyColorController",
&construct<BSEffectShaderPropertyColorController, RC_BSEffectShaderPropertyColorController> }, &construct<BSEffectShaderPropertyColorController, RC_BSEffectShaderPropertyColorController> },
{ "BSLightingShaderPropertyColorController",
&construct<BSEffectShaderPropertyColorController, RC_BSLightingShaderPropertyColorController> },
{ "BSBehaviorGraphExtraData", &construct<BSBehaviorGraphExtraData, RC_BSBehaviorGraphExtraData> },
}; };
} }

@ -497,4 +497,12 @@ namespace Nif
nif->read(mAlphaSortBound); nif->read(mAlphaSortBound);
nif->read(mStaticBound); nif->read(mStaticBound);
} }
void BSRangeNode::read(NIFStream* nif)
{
NiNode::read(nif);
nif->read(mMin);
nif->read(mMax);
nif->read(mCurrent);
}
} }

@ -392,5 +392,13 @@ namespace Nif
void read(NIFStream* nif) override; void read(NIFStream* nif) override;
}; };
struct BSRangeNode : NiNode
{
uint8_t mMin, mMax;
uint8_t mCurrent;
void read(NIFStream* nif) override;
};
} // Namespace } // Namespace
#endif #endif

@ -234,7 +234,7 @@ namespace Nif
void bhkConstraintMotorCInfo::read(NIFStream* nif) void bhkConstraintMotorCInfo::read(NIFStream* nif)
{ {
mType = static_cast<hkMotorType>(nif->get<uint32_t>()); mType = static_cast<hkMotorType>(nif->get<uint8_t>());
switch (mType) switch (mType)
{ {
case hkMotorType::Motor_Position: case hkMotorType::Motor_Position:

@ -121,6 +121,7 @@ namespace Nif
RC_NiFloatInterpolator, RC_NiFloatInterpolator,
RC_NiPoint3Interpolator, RC_NiPoint3Interpolator,
RC_NiBoolInterpolator, RC_NiBoolInterpolator,
RC_NiBoolTimelineInterpolator,
RC_NiTransformInterpolator, RC_NiTransformInterpolator,
RC_NiColorInterpolator, RC_NiColorInterpolator,
RC_BSShaderTextureSet, RC_BSShaderTextureSet,
@ -171,6 +172,8 @@ namespace Nif
RC_BSEffectShaderPropertyFloatController, RC_BSEffectShaderPropertyFloatController,
RC_BSEffectShaderPropertyColorController, RC_BSEffectShaderPropertyColorController,
RC_BSLightingShaderPropertyFloatController, RC_BSLightingShaderPropertyFloatController,
RC_BSLightingShaderPropertyColorController,
RC_BSBehaviorGraphExtraData,
}; };
/// Base class for all records /// Base class for all records

Loading…
Cancel
Save