In our game, shadows generated for dynamic objects through a shadowmap render on the wrong sides of walls.
Here you can see the issue: In the top right corner you see the shadow from a box I placed on the upper floor. This box casts shadows both on the upper floor, the lower floor and the second box placed on the lower floor.

The shadowmap is generated by the engine and we have no access to it. The only thing we can influence is the projection of the shadows onto the scene in the shader. I read through some tutorials about shadow-mapping, but none address the issue of walls or buildings with multiple floors.