Quote:
Originally Posted by HamletEagle
If a player is alive how he could not be connected to server ? So:
1. is_user_alive check if player is connected and if player is alive.
2. is_user_connected checks only if player is connected, it can be alive or dead.
3. checking just is_user_alive to know if player is connected or not is not accurate, because it can be dead but still connected(like he was killed during the round and wait for respawn).
|
Well, I know that if is player alive, he must be connected to server, but though, that if player is not alive, it still means that he is connected to server because of this piece of code
Code:
return((pPlayer->ingame && pPlayer->IsAlive()) ? 1 : 0);
But still - player in game ( returns 1 ) && player is alive( returns 1) - player alive - returns 1
player in game ( returns 1 ) && player is not alive ( returns 0 ) function returns 0
player in game ( returns 0 ) && player is not alive ( returns 0 ) function returns 0
So, if player is not alive i have to check, that if he is connected to server.