From d09569b56c5885ae39bdbf8a5536700f9942995e Mon Sep 17 00:00:00 2001 From: zicodxx <> Date: Thu, 20 Nov 2008 18:02:42 +0000 Subject: [PATCH] Small transparency fix for robot weapons; Some timer-Failsafe in robot/boss dying frames; Fixed logical flaw in create_small_fireball_on_object() closing out sound effects on robots --- CHANGELOG.txt | 1 + main/ai.c | 3 ++- main/object.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index d80428ed5..129fba9e1 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,6 +3,7 @@ D1X-Rebirth Changelog 20081120 -------- main/ai.c: When we reached MAX_BOSS_TELEPORT_SEGS in init_boss_segments, make sure we also escape out of the for-loop - otherwise we still might overflow +main/ai.c, main/object.c: Some timer-Failsafe in robot/boss dying frames; Fixed logical flaw in create_small_fireball_on_object() closing out sound effects on robots 20081119 -------- diff --git a/main/ai.c b/main/ai.c index aafedf089..490f9e04f 100644 --- a/main/ai.c +++ b/main/ai.c @@ -2043,7 +2043,8 @@ void do_boss_dying_frame(object *objp) } else if (d_rand() < FrameTime*8) create_small_fireball_on_object(objp, (F1_0/2 + d_rand()) * 8, 1); - if (Boss_dying_start_time + BOSS_DEATH_DURATION < GameTime) { + if (Boss_dying_start_time + BOSS_DEATH_DURATION < GameTime || GameTime+(F1_0*2) < Boss_dying_start_time) { + Boss_dying_start_time=GameTime; // make sure following only happens one time! do_controlcen_destroyed_stuff(NULL); explode_object(objp, F1_0/4); digi_link_sound_to_object2(SOUND_BADASS_EXPLOSION, objp-Objects, 0, F2_0, F1_0*512); diff --git a/main/object.c b/main/object.c index 6ea1ced84..8f4276fbc 100644 --- a/main/object.c +++ b/main/object.c @@ -504,7 +504,7 @@ void create_small_fireball_on_object(object *objp, fix size_scale, int sound_fla fix vol = F1_0/2; if (objp->type == OBJ_ROBOT) vol *= 2; - else if (sound_flag) + if (sound_flag) digi_link_sound_to_object(SOUND_EXPLODING_WALL, objp-Objects, 0, vol); } }