private void CheckAndDiscardShapes() { this.m_lastDiscardCheck++; if (((this.m_lastDiscardCheck > 0x12) && ((this.m_nearbyEntities.Count == 0) && (this.RigidBody != null))) && EnableShapeDiscard) { this.m_lastDiscardCheck = 0; HkUniformGridShape shape = (HkUniformGridShape)this.GetShape(); int hitsAndClear = shape.GetHitsAndClear(); if ((shape.ShapeCount > 0) && (hitsAndClear <= 0)) { shape.DiscardLargeData(); if (this.RigidBody2 != null) { shape = (HkUniformGridShape)this.RigidBody2.GetShape(); if (shape.GetHitsAndClear() <= 0) { shape.DiscardLargeData(); } } } } }