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

This commit is contained in:
zicodxx 2008-11-20 18:02:42 +00:00
parent 74fd36d2f9
commit 996748bdba
4 changed files with 6 additions and 3 deletions

View file

@ -4,6 +4,7 @@ D2X-Rebirth Changelog
--------
main/ai2.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/piggy.c: Corrected a small logical mistake in Shareware-HAM recognition
arch/ogl/ogl.c, main/ai2.c, main/object.c: 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
20081119
--------

View file

@ -827,7 +827,7 @@ bool g3_draw_bitmap(vms_vector *pos,fix width,fix height,grs_bitmap *bm, int ori
// Define alpha by looking for object TYPE or ID. We do this here so we have it seperated from the rest of the code.
if (PlayerCfg.OglAlphaEffects && // if -gl_transparency draw following bitmaps
(obj->type==OBJ_FIREBALL || // all types of explosions and energy-effects
(obj->type==OBJ_WEAPON && (obj->id != PROXIMITY_ID && obj->id != SUPERPROX_ID)) || // weapon fire except bombs
(obj->type==OBJ_WEAPON && (obj->id != PROXIMITY_ID && obj->id != SUPERPROX_ID && obj->id != ROBOT_SUPERPROX_ID && obj->id != PMINE_ID)) || // weapon fire except bombs
obj->id==POW_EXTRA_LIFE || // extra life
obj->id==POW_ENERGY || // energy powerup
obj->id==POW_SHIELD_BOOST || // shield boost

View file

@ -2069,7 +2069,7 @@ int do_robot_dying_frame(object *objp, fix start_time, fix roll_duration, sbyte
} else if (d_rand() < FrameTime*8)
create_small_fireball_on_object(objp, (F1_0/2 + d_rand()) * (16 * expl_scale/F1_0)/8, 1);
if (start_time + roll_duration < GameTime)
if (start_time + roll_duration < GameTime || GameTime+(F1_0*2) < start_time)
return 1;
else
return 0;
@ -2092,6 +2092,7 @@ void do_boss_dying_frame(object *objp)
rval = do_robot_dying_frame(objp, Boss_dying_start_time, BOSS_DEATH_DURATION, &Boss_dying_sound_playing, Robot_info[objp->id].deathroll_sound, F1_0*4, F1_0*4);
if (rval) {
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);
@ -2110,6 +2111,7 @@ int do_any_robot_dying_frame(object *objp)
rval = do_robot_dying_frame(objp, objp->ctype.ai_info.dying_start_time, min(death_roll/2+1,6)*F1_0, &objp->ctype.ai_info.dying_sound_playing, Robot_info[objp->id].deathroll_sound, death_roll*F1_0/8, death_roll*F1_0/2);
if (rval) {
objp->ctype.ai_info.dying_start_time = GameTime; // make sure following only happens one time!
explode_object(objp, F1_0/4);
digi_link_sound_to_object2(SOUND_BADASS_EXPLOSION, objp-Objects, 0, F2_0, F1_0*512);
if ((Current_level_num < 0) && (Robot_info[objp->id].thief))

View file

@ -657,7 +657,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);
}
}