CScriptTemplate: Convert EAttachType into an enum class
Prevents polluting the global namespace.
This commit is contained in:
parent
31a1de9191
commit
3bd84d8c41
|
@ -14,10 +14,9 @@ class CGameTemplate;
|
||||||
class CScriptObject;
|
class CScriptObject;
|
||||||
typedef TString TIDString;
|
typedef TString TIDString;
|
||||||
|
|
||||||
enum EAttachType
|
enum class EAttachType {
|
||||||
{
|
Attach,
|
||||||
eAttach,
|
Follow
|
||||||
eFollow
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SAttachment
|
struct SAttachment
|
||||||
|
|
|
@ -739,11 +739,13 @@ CTransform4f CScriptNode::BoneTransform(uint32 BoneID, EAttachType AttachType, b
|
||||||
CBone *pBone = pSkel->BoneByID(BoneID);
|
CBone *pBone = pSkel->BoneByID(BoneID);
|
||||||
ASSERT(pBone);
|
ASSERT(pBone);
|
||||||
|
|
||||||
if (AttachType == eAttach) Out.Rotate(pBone->Rotation());
|
if (AttachType == EAttachType::Attach)
|
||||||
|
Out.Rotate(pBone->Rotation());
|
||||||
Out.Translate(pBone->Position());
|
Out.Translate(pBone->Position());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Absolute) Out = Transform() * Out;
|
if (Absolute)
|
||||||
|
Out = Transform() * Out;
|
||||||
|
|
||||||
return Out;
|
return Out;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue