package pt.up.fe.pt.lpoo.bombermen.entities;

import pt.up.fe.pt.lpoo.bombermen.Constants;
import pt.up.fe.pt.lpoo.bombermen.Entity;

import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.TextureRegion;

public class Wall extends Entity
{
    public Wall(int guid, int hitPoints)
    {
        super(Entity.TYPE_WALL, guid);

        _hitPoints = hitPoints;

        BoundRect.setWidth(Constants.WALL_BOUNDING_WIDTH);
        BoundRect.setHeight(Constants.WALL_BOUNDING_HEIGHT);
    }

    private int _hitPoints;
    public static TextureRegion Regions[][];

    public boolean IsUndestroyable()
    {
        return _hitPoints != -1;
    }

    @Override
    public void draw(SpriteBatch batch, float parentAlpha)
    {
        Color color = getColor();
        batch.setColor(color.r, color.g, color.b, color.a * parentAlpha);
        batch.draw(Regions[0][IsUndestroyable() ? 1 : 0], getX(), getY(), getOriginX(), getOriginY(),
                getWidth(), getHeight(), getScaleX(), getScaleY(), getRotation());
    }
}

@@ -273,43 +273,515 @@
 on;%0A
-%0Apublic class Wall extends Entity%0A%7B
+import com.badlogic.gdx.math.Rectangle;%0A%0Apublic class Wall extends Entity%0A%7B%0A    private static final float offsetWidth = (Constants.WALL_WIDTH - Constants.WALL_BOUNDING_WIDTH) / 2.f;%0A    private static final float offsetHeight = (Constants.WALL_HEIGHT - Constants.WALL_BOUNDING_HEIGHT) / 2.f;%0A    %0A    @Override%0A    public Rectangle GetBoundingRectangle()%0A    %7B%0A        Rectangle rect = super.GetBoundingRectangle();%0A        rect.x += offsetWidth;%0A        rect.y += offsetHeight;%0A        return rect;%0A    %7D%0A
 %0A   

Fix Wall bounding box in client