| 673 | } |
| 674 | |
| 675 | void PlayerIsGone (int netnode, int netconsole) |
| 676 | { |
| 677 | int i; |
| 678 | |
| 679 | if (nodeingame[netnode]) |
| 680 | { |
| 681 | for (i = netnode + 1; i < doomcom.numnodes; ++i) |
| 682 | { |
| 683 | if (nodeingame[i]) |
| 684 | break; |
| 685 | } |
| 686 | if (i == doomcom.numnodes) |
| 687 | { |
| 688 | doomcom.numnodes = netnode; |
| 689 | } |
| 690 | |
| 691 | #if 0 |
| 692 | if (playeringame[netconsole]) |
| 693 | { |
| 694 | players[netconsole].playerstate = PST_GONE; |
| 695 | } |
| 696 | #endif |
| 697 | nodeingame[netnode] = false; |
| 698 | nodejustleft[netnode] = false; |
| 699 | } |
| 700 | else if (nodejustleft[netnode]) // Packet Server |
| 701 | { |
| 702 | if (netnode + 1 == doomcom.numnodes) |
| 703 | { |
| 704 | doomcom.numnodes = netnode; |
| 705 | } |
| 706 | #if 0 |
| 707 | if (playeringame[netconsole]) |
| 708 | { |
| 709 | players[netconsole].playerstate = PST_GONE; |
| 710 | } |
| 711 | #endif |
| 712 | nodejustleft[netnode] = false; |
| 713 | } |
| 714 | else return; |
| 715 | |
| 716 | if (netconsole == Net_Arbitrator) |
| 717 | { |
| 718 | // Pick a new network arbitrator |
| 719 | for (int pl = 0; pl < MAXPLAYERS; pl++) |
| 720 | { |
| 721 | #if 0 |
| 722 | if (i != netconsole && playeringame[i] && players[i].Bot == NULL) |
| 723 | { |
| 724 | Net_Arbitrator = i; |
| 725 | players[i].settings_controller = true; |
| 726 | Printf("%s is the new arbitrator\n", players[i].userinfo.GetName()); |
| 727 | break; |
| 728 | } |
| 729 | #endif |
| 730 | } |
| 731 | } |
| 732 |
no test coverage detected