From cb7a254b8dba7f93f702df20a148738090238743 Mon Sep 17 00:00:00 2001 From: terminx Date: Sun, 7 May 2006 05:12:59 +0000 Subject: [PATCH] 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 --- polymer/eduke32/source/actors.c | 10 ++++++++++ polymer/eduke32/source/game.c | 11 +++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/polymer/eduke32/source/actors.c b/polymer/eduke32/source/actors.c index adb6bdd0a..fe474ee5e 100644 --- a/polymer/eduke32/source/actors.c +++ b/polymer/eduke32/source/actors.c @@ -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: diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 0fa476986..1d77c2c42 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -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,§,&hw,&hs,&sx,&sy,&sz,CLIPMASK1); + (100-ps[screenpeek].horiz-ps[screenpeek].horizoff)<<11,§,&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--; } }