no land sound when dead, no broken-ear snd effect when dead, knife selection fixed, hud stats in spect mode
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2058 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
+18
-25
@@ -325,10 +325,10 @@ void parsemessages(int cn, playerent *d, ucharbuf &p)
|
||||
loopk(3) from[k] = getint(p)/DMF;
|
||||
loopk(3) to[k] = getint(p)/DMF;
|
||||
playerent *s = getclient(scn);
|
||||
if(!s) break;
|
||||
if(!s || !weapon::valid(gun)) break;
|
||||
if(gun==GUN_SHOTGUN) createrays(from, to);
|
||||
s->lastaction = lastmillis;
|
||||
//s->lastattackweapon = s->weaponsel;
|
||||
s->mag[gun]--;
|
||||
if(s->weapons[gun])
|
||||
{
|
||||
s->lastattackweapon = s->weapons[gun];
|
||||
@@ -350,6 +350,17 @@ void parsemessages(int cn, playerent *d, ucharbuf &p)
|
||||
break;
|
||||
}
|
||||
|
||||
case SV_RELOAD:
|
||||
{
|
||||
int cn = getint(p), gun = getint(p);
|
||||
playerent *p = cn==getclientnum() ? player1 : getclient(cn);
|
||||
if(!p || p==player1) break;
|
||||
int bullets = magsize(gun)-p->mag[gun];
|
||||
p->ammo[gun] -= bullets;
|
||||
p->mag[gun] += bullets;
|
||||
break;
|
||||
}
|
||||
|
||||
case SV_GIBDAMAGE:
|
||||
case SV_DAMAGE:
|
||||
{
|
||||
@@ -395,7 +406,7 @@ void parsemessages(int cn, playerent *d, ucharbuf &p)
|
||||
{
|
||||
int cn = getint(p);
|
||||
if(cn<0) break;
|
||||
int state = getint(p), lifesequence = getint(p), gunselect = getint(p), flagscore = getint(p), frags = getint(p), deaths = getint(p);
|
||||
int state = getint(p), lifesequence = getint(p), gunselect = getint(p), flagscore = getint(p), frags = getint(p), deaths = getint(p), health = getint(p), armour = getint(p);
|
||||
playerent *d = (cn == getclientnum() ? player1 : newclient(cn));
|
||||
if(!d) continue;
|
||||
if(d!=player1) d->state = state;
|
||||
@@ -404,6 +415,10 @@ void parsemessages(int cn, playerent *d, ucharbuf &p)
|
||||
d->frags = frags;
|
||||
d->deaths = deaths;
|
||||
d->selectweapon(gunselect);
|
||||
d->health = health;
|
||||
d->armour = armour;
|
||||
loopi(NUMGUNS) d->ammo[i] = getint(p);
|
||||
loopi(NUMGUNS) d->mag[i] = getint(p);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -666,28 +681,6 @@ void parsemessages(int cn, playerent *d, ucharbuf &p)
|
||||
break;
|
||||
}
|
||||
|
||||
case SV_HEALTHINFO:
|
||||
{
|
||||
int cn = getint(p);
|
||||
playerent *pl = cn == getclientnum() ? player1 : getclient(cn);
|
||||
if(!pl) return;
|
||||
pl->health = getuint(p);
|
||||
pl->armour = getuint(p);
|
||||
break;
|
||||
}
|
||||
|
||||
case SV_AMMOINFO:
|
||||
{
|
||||
int cn = getint(p);
|
||||
playerent *pl = cn == getclientnum() ? player1 : getclient(cn);
|
||||
if(!pl) return;
|
||||
int weapon = pl->gunselect;
|
||||
if(weapon<0 || weapon>=NUMGUNS) return;
|
||||
pl->mag[weapon] = getuint(p);
|
||||
pl->ammo[weapon] = getuint(p);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
neterr("type");
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user