Fix SFX burst nodes. Fix #644
This commit is contained in:
@@ -302,8 +302,6 @@ void run_a_missile(location from,location fire_to,miss_num_t miss_type,short pat
|
||||
}
|
||||
|
||||
void run_a_boom(location boom_where,short type,short x_adj,short y_adj,short snd) {
|
||||
if((type < 0) || (type > 2))
|
||||
return;
|
||||
start_missile_anim();
|
||||
add_explosion(boom_where,-1,0,type, x_adj, y_adj);
|
||||
do_explosion_anim(5,0,snd);
|
||||
@@ -570,7 +568,9 @@ void do_explosion_anim(short /*sound_num*/,short special_draw, short snd) {
|
||||
|
||||
if(std::all_of(store_booms, store_booms + 30, [](const store_boom_type& b) {
|
||||
return b.boom_type == 0;
|
||||
})) return;
|
||||
})){
|
||||
return;
|
||||
}
|
||||
|
||||
// make terrain_template contain current terrain all nicely
|
||||
draw_terrain(1);
|
||||
@@ -623,7 +623,7 @@ void do_explosion_anim(short /*sound_num*/,short special_draw, short snd) {
|
||||
UI::toolbar.draw(mainPtr());
|
||||
|
||||
// Now put in explosions
|
||||
for(short i = 0; i < 30; i++)
|
||||
for(short i = 0; i < 30; i++){
|
||||
if(store_booms[i].boom_type >= 0) {
|
||||
if((t + store_booms[i].offset >= 0) && (t + store_booms[i].offset <= 7)) {
|
||||
if(cur_boom_type >= 1000) {
|
||||
@@ -653,6 +653,7 @@ void do_explosion_anim(short /*sound_num*/,short special_draw, short snd) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//if(((PSD[SDF_GAME_SPEED] == 1) && (t % 3 == 0)) || ((PSD[SDF_GAME_SPEED] == 2) && (t % 2 == 0)))
|
||||
refresh_stat_areas(0);
|
||||
refresh_text_bar();
|
||||
|
@@ -990,7 +990,7 @@ pic_num_t choose_damage_type(short cur, cDialog* parent, bool allow_spec) {
|
||||
return made_choice ? item_hit : prev;
|
||||
}
|
||||
|
||||
static pic_num_t choose_boom_type(short cur, cDialog* parent) {
|
||||
static short choose_boom_type(short cur, cDialog* parent) {
|
||||
static const int preset_booms = 6;
|
||||
static const char*const boomNames[preset_booms+1] = {
|
||||
"Fire", "Teleport", "Magic/Electricity",
|
||||
@@ -1014,7 +1014,7 @@ static pic_num_t choose_boom_type(short cur, cDialog* parent) {
|
||||
});
|
||||
bool made_choice = pic_dlg.show(cur);
|
||||
size_t item_hit = pic_dlg.getPicChosen();
|
||||
return made_choice ? item_hit : prev;
|
||||
return made_choice ? item_hit - 8 : prev;
|
||||
}
|
||||
|
||||
snd_num_t choose_sound(short cur, cDialog* parent, std::string title) {
|
||||
|
Reference in New Issue
Block a user