sync player state with other players on spawn
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2615 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -297,13 +297,16 @@ void parsemessages(int cn, playerent *d, ucharbuf &p)
|
||||
|
||||
case SV_SPAWN:
|
||||
{
|
||||
int ls = getint(p), gunselect = getint(p);
|
||||
if(!d) break;
|
||||
d->respawn();
|
||||
d->spawnstate(gamemode);
|
||||
d->lifesequence = ls;
|
||||
playerent *s = d;
|
||||
if(!s) { static playerent dummy; s = &dummy; }
|
||||
s->respawn();
|
||||
s->lifesequence = getint(p);
|
||||
s->health = getint(p);
|
||||
s->armour = getint(p);
|
||||
s->selectweapon(getint(p));
|
||||
loopi(NUMGUNS) s->ammo[i] = getint(p);
|
||||
loopi(NUMGUNS) s->mag[i] = getint(p);
|
||||
d->state = CS_SPAWNING;
|
||||
d->selectweapon(gunselect);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user