Sagging floor joists

The joists above this family room appeared to be overspanned, but leakage from a bathroom above appeared to have soaked them. Ceiling stains were visible. Using a tape, there was a two-inch height diffrence between the measurement around the perimeter of the room and in the middle. The floor was pretty flat.
If moisture levels are high enough for long enough, incipient (early) wood decay can cause wood to lose up to 50% of its strength with no damage visible.
The photo below shows about a 3-inch horizontal shadow at the ceiling wall junction above and to the right of the door. This popped out when I shone my light along the ceiling, and the shadow is an indication of the seriousness of the sag.