I want the dead players to be able to watch environmental changes for a few seconds (or a fix amount of time) before they are cut off from the server. How can I achieve this?
I am thinking of using a timestamp. So when the player is dead I record the time for that player and a few seconds later I loop through the player list and disconnect the players that have been dead for certain amount of time. The problem is I loop through the player list at a fix interval which is about 10 seconds. Some players may get disconnected early and some may get disconnected after a longer period because if they miss current loop they need to wait for another 10 seconds to be disconnected.
Another problem is that on client side I don't see any environmental changes after the player gets killed. It just stops there and looks like connection is lost. (I don't have any client data controlling the updates, all the data comes from the server).