Conversation so far:
Who is Pete Maravich?
Peter Press Maravich (June 22, 1947 – January 5, 1988), known by his nickname Pistol Pete, was an American professional basketball player.
When did Pete Maravich die?
On January 5, 1988, Pete Maravich died at age 40.
Where did Pete Maravich die?
Pete Maravich was playing in a pickup basketball game in the gym at First Church of the Nazarene in Pasadena, California.
How did Pete Maravich die?
Pete Maravich collapsed and died of heart failure.

Question: what was he doing when he died
Self-contained rewrite: What was Pete Maravic doing when he died?