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;
|
||||
typedef TString TIDString;
|
||||
|
||||
enum EAttachType
|
||||
{
|
||||
eAttach,
|
||||
eFollow
|
||||
enum class EAttachType {
|
||||
Attach,
|
||||
Follow
|
||||
};
|
||||
|
||||
struct SAttachment
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue