| 749 | case SV_RESUME: |
| 750 | { |
| 751 | loopi(MAXCLIENTS) |
| 752 | { |
| 753 | int cn = getint(p); |
| 754 | if(p.overread() || cn<0) break; |
| 755 | int state = getint(p), |
| 756 | lifesequence = getint(p), |
| 757 | primary = getint(p), |
| 758 | gunselect = getint(p), |
| 759 | flagscore = getint(p), |
| 760 | frags = getint(p), |
| 761 | deaths = getint(p), |
| 762 | health = getint(p), |
| 763 | armour = getint(p), |
| 764 | teamkills = getint(p); |
| 765 | int ammo[NUMGUNS], mag[NUMGUNS]; |
| 766 | loopi(NUMGUNS) ammo[i] = getint(p); |
| 767 | loopi(NUMGUNS) mag[i] = getint(p); |
| 768 | playerent *d = (cn == getclientnum() ? player1 : newclient(cn)); |
| 769 | if(!d) continue; |
| 770 | if(d!=player1) d->state = state; |
| 771 | d->lifesequence = lifesequence; |
| 772 | d->flagscore = flagscore; |
| 773 | d->frags = frags; |
| 774 | d->deaths = deaths; |
| 775 | d->tks = teamkills; |
| 776 | if(d!=player1) |
| 777 | { |
| 778 | d->setprimary(primary); |
| 779 | d->selectweapon(gunselect); |
| 780 | d->health = health; |
| 781 | d->armour = armour; |
| 782 | memcpy(d->ammo, ammo, sizeof(ammo)); |
| 783 | memcpy(d->mag, mag, sizeof(mag)); |
| 784 | if(d->lifesequence==0) d->resetstats(); //NEW |
| 785 | } |
| 786 | } |
| 787 | break; |
| 788 | } |
| 789 |
no test coverage detected