CScriptNode: Make use of size_t where applicable
This commit is contained in:
parent
8fbc92b0e0
commit
a48d3202b6
|
@ -72,8 +72,8 @@ public:
|
|||
CTexture* ActiveBillboard() const;
|
||||
bool UsesModel() const;
|
||||
|
||||
uint32 NumAttachments() const { return mAttachments.size(); }
|
||||
CScriptAttachNode* Attachment(uint32 Index) const { return mAttachments[Index]; }
|
||||
size_t NumAttachments() const { return mAttachments.size(); }
|
||||
CScriptAttachNode* Attachment(size_t Index) const { return mAttachments[Index]; }
|
||||
CResource* DisplayAsset() const { return mpDisplayAsset; }
|
||||
|
||||
protected:
|
||||
|
|
|
@ -4,7 +4,7 @@ CSandwormExtra::CSandwormExtra(CScriptObject* pInstance, CScene* pScene, CScript
|
|||
: CScriptExtra(pInstance, pScene, pParent)
|
||||
{
|
||||
// The back pincers need to be flipped 180 degrees
|
||||
for (uint32 AttachIdx = 0; AttachIdx < pParent->NumAttachments(); AttachIdx++)
|
||||
for (size_t AttachIdx = 0; AttachIdx < pParent->NumAttachments(); AttachIdx++)
|
||||
{
|
||||
CScriptAttachNode *pAttach = pParent->Attachment(AttachIdx);
|
||||
|
||||
|
@ -14,17 +14,18 @@ CSandwormExtra::CSandwormExtra(CScriptObject* pInstance, CScene* pScene, CScript
|
|||
|
||||
// Get pincers scale
|
||||
mPincersScale = CFloatRef(pInstance->PropertyData(), pInstance->Template()->Properties()->ChildByID(0x3DB583AE));
|
||||
if (mPincersScale.IsValid()) PropertyModified(mPincersScale.Property());
|
||||
if (mPincersScale.IsValid())
|
||||
PropertyModified(mPincersScale.Property());
|
||||
}
|
||||
|
||||
void CSandwormExtra::PropertyModified(IProperty* pProp)
|
||||
{
|
||||
if (pProp == mPincersScale)
|
||||
{
|
||||
for (uint32 AttachIdx = 0; AttachIdx < mpScriptNode->NumAttachments(); AttachIdx++)
|
||||
for (size_t AttachIdx = 0; AttachIdx < mpScriptNode->NumAttachments(); AttachIdx++)
|
||||
{
|
||||
CScriptAttachNode* pAttach = mpScriptNode->Attachment(AttachIdx);
|
||||
pAttach->SetScale( CVector3f(mPincersScale) );
|
||||
pAttach->SetScale(CVector3f(mPincersScale));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue