Limit the player ID distance to 12288 and stop the selection sounds of weapons that you scroll past

git-svn-id: https://svn.eduke32.com/eduke32@155 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2006-05-07 05:12:59 +00:00
parent d42b0019e0
commit cb7a254b8d
2 changed files with 17 additions and 4 deletions

View File

@ -113,6 +113,16 @@ void addweaponnoswitch( struct player_struct *p, short weapon)
if(weapon == SHRINKER_WEAPON)
p->gotweapon[GROW_WEAPON] = 1;
}
switch(p->curr_weapon)
{
case KNEE_WEAPON:
case TRIPBOMB_WEAPON:
case HANDREMOTE_WEAPON:
case HANDBOMB_WEAPON: break;
case SHOTGUN_WEAPON: stopspritesound(SHOTGUN_COCK,p->i);break;
case PISTOL_WEAPON: stopspritesound(INSERT_CLIP,p->i);break;
default: stopspritesound(SELECT_WEAPON,p->i);break;
}
switch(weapon)
{
case KNEE_WEAPON:

View File

@ -3004,15 +3004,18 @@ void displayrest(long smoothratio)
hitscan(ps[screenpeek].posx,ps[screenpeek].posy,ps[screenpeek].posz,ps[screenpeek].cursectnum,
sintable[(ps[screenpeek].ang+512)&2047],
sintable[ps[screenpeek].ang&2047],
(100-ps[screenpeek].horiz-ps[screenpeek].horizoff)<<11,&sect,&hw,&hs,&sx,&sy,&sz,CLIPMASK1);
(100-ps[screenpeek].horiz-ps[screenpeek].horizoff)<<11,&sect,&hw,&hs,&sx,&sy,&sz,0xffff0030);
if(sprite[hs].picnum == APLAYER && sprite[hs].yvel != screenpeek)
{
if(ps[screenpeek].fta == 0 || ps[screenpeek].ftq == 117)
{
Bsprintf(fta_quotes[117],"%s",&ud.user_name[sprite[hs].yvel][0]);
ps[screenpeek].fta = 12;
ps[screenpeek].ftq = 117;
if(ldist(&sprite[ps[screenpeek].i],&sprite[hs]) < 12288)
{
Bsprintf(fta_quotes[117],"%s",&ud.user_name[sprite[hs].yvel][0]);
ps[screenpeek].fta = 12;
ps[screenpeek].ftq = 117;
}
} else ps[screenpeek].fta--;
}
}