From 3fcc3771bd87c7446707930c4406c8b2fbdae156 Mon Sep 17 00:00:00 2001 From: terminx Date: Tue, 14 Aug 2007 21:29:44 +0000 Subject: [PATCH] Sound fix git-svn-id: https://svn.eduke32.com/eduke32@553 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/actors.c | 4 +++- polymer/eduke32/source/gamedef.c | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/polymer/eduke32/source/actors.c b/polymer/eduke32/source/actors.c index 72156ad36..756bda20a 100644 --- a/polymer/eduke32/source/actors.c +++ b/polymer/eduke32/source/actors.c @@ -1239,7 +1239,9 @@ static void movefx(void) if (p == myconnectindex && ps[p].cursectnum == s->sectnum) { j = s->lotag+((unsigned)global_random%(s->hitag+1)); - sound(j); + if (j < NUM_SOUNDS && sounds[j]) + sound(j); + else OSD_Printf("WARNING: invalid sound #%d\n",j); T5 = 26*40 + (global_random%(26*40)); } } diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index f2f87f1f4..3ac9fdf39 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -4650,7 +4650,6 @@ static void InitProjectiles(void) projectile[i].offset = 448; projectile[i].bounces = numfreezebounces; projectile[i].bsound = PIPEBOMB_BOUNCE; - // defaultprojectile[i] = projectile[i]; } Bmemcpy(&defaultprojectile, &projectile, sizeof(projectile)); }