Optimize code to track player shot
It's a little difficult to do a good review because there are so many pieces missing, but I've guessed at a number of things and I believe I can help.

Specifically, it looks like your Map is a rectangular grid of Blocks and that all x and y coordinates are integers.  If so, then your shot routine is really doing the equivalent of drawing a line from the entity location to the passed x1,y1 coordinates and one very efficient way to do that is to use Bresenham's line-drawing algorithm.  Using a slight modification of that algorithm, since your shot routine seems to want to go until it either hits something or goes off the Map, we get a very efficient and very small routine:

void shoot(Map *map, Entity *entity, int x1, int y1)
{
    int sx = entity-&gt;x1 &lt; x1 ? 1 : -1;
    int sy = entity-&gt;y1 &lt; y1 ? 1 : -1;
    int dx = abs(x1 - entity-&gt;x1);
    int dy = abs(y1 - entity-&gt;y1);
    int err = (dx&gt;dy ? dx : -dy)/2;
    int e2;

    x1 = entity-&gt;x1;
    y1 = entity-&gt;y1;
    Block *block;
    while (inbounds(map,x1,y1)) {
        e2 = err;
        if (e2 &gt; -dx) {
            err -= dy;
            x1 += sx;
        }
        if (e2 &lt; dy) {
            err += dx; 
            y1 += sy;
        }
        if((block = map_block_at(map, x1, y1))-&gt;type != EMPTY){
            block_cause_damage(block, entity-&gt;hand_item-&gt;weapon.damage);
            return;
        }
    }
}


I've assumed that you have or can easily write an inbounds routine that returns true if the passed coordinates are within the Map.