Spinosaurs' semi-aquatic habits helped them coexist with tyrannosaurs.