['When I was playing ball at the gym someone got hurt.']
That is too bad. How did they get hurt?
When I was at the gym someone got hurt and I laughed. When I found out how bad it was I realized I shouldn't have laughed.