//------------------------------------------------------------------------ void CIronSight::Init(IWeapon *pWeapon, const struct IItemParamsNode *params, uint32 id) { m_pWeapon = static_cast<CWeapon *>(pWeapon); m_zmIdx = id; InitSharedParams(); CacheSharedParamsPtr(); ResetParams(params); }
void CMelee::Init(IWeapon *pWeapon, const struct IItemParamsNode *params, uint32 id) { m_pWeapon = static_cast<CWeapon *>(pWeapon); m_fmIdx = id; InitSharedParams(); CacheSharedParamsPtr(); if (params) { ResetParams(params); } m_attacking = false; m_attacked = false; m_delayTimer = 0.0f; m_durationTimer = 0.0f; m_ignoredEntity = 0; m_meleeScale = 1.0f; }