CScriptTemplate: Convert EAttachType into an enum class

Prevents polluting the global namespace.
This commit is contained in:
Lioncash 2020-06-18 06:52:54 -04:00
parent 31a1de9191
commit 3bd84d8c41
2 changed files with 7 additions and 6 deletions

View File

@ -14,10 +14,9 @@ class CGameTemplate;
class CScriptObject;
typedef TString TIDString;
enum EAttachType
{
eAttach,
eFollow
enum class EAttachType {
Attach,
Follow
};
struct SAttachment

View File

@ -739,11 +739,13 @@ CTransform4f CScriptNode::BoneTransform(uint32 BoneID, EAttachType AttachType, b
CBone *pBone = pSkel->BoneByID(BoneID);
ASSERT(pBone);
if (AttachType == eAttach) Out.Rotate(pBone->Rotation());
if (AttachType == EAttachType::Attach)
Out.Rotate(pBone->Rotation());
Out.Translate(pBone->Position());
}
if (Absolute) Out = Transform() * Out;
if (Absolute)
Out = Transform() * Out;
return Out;
}