public void setPosition(Position paramPosition)
  {
    if ((this.LastCell != null) && (this.LastPosition != null))
    {
      if ((this.LastPosition.x != paramPosition.x) || (this.LastPosition.y != paramPosition.y))
      {
        this.LastCell.x = this.LastPosition.x;
        this.LastCell.y = this.LastPosition.y;
      }
    }
    else {
      this.LastCell = new Position(paramPosition);
    }
    Position localPosition = this.location;

    this.location = paramPosition;
    setLocation(Position.mapToScreen(paramPosition));

    if (this.environment != null)
    {
      if (this.LastPosition != null)
        this.environment.moveObject(this, this.LastPosition.getMapPoint());
      else {
        place(this.environment.getObjectMap());
      }

      if (this.CurrentRenderer != null)
      {
        this.CurrentRenderer.reportNewPosition(this);
      }

    }

    this.LastPosition = localPosition;
  }