public void HandleCollisions() { feelerOcclusion = 0; feelerCreature = null; CalculateFeelerPos(MAXIMUMFEELERDISTANCE); for (int i = owner.collisionGridX - 1; i <= owner.collisionGridX + 1; i++) { for (int k = owner.collisionGridY - 1; k <= owner.collisionGridY + 1; k++) { if (i >= 0 && k >= 0 && i < CreatureManager.COLLISIONGRIDSIZE && k < CreatureManager.COLLISIONGRIDSIZE) { List <Creature> collisionList = CreatureManager.GetCollisionGridList(i, k); HandleCollisionsWithList(collisionList); } } } }