Sound fix... network player drppoed bombs without sound.

origin
stpohle 23 years ago
parent 11b3b83f98
commit f028f523e1

@ -6,6 +6,7 @@
#include "gamesrv.h" #include "gamesrv.h"
#include "packets.h" #include "packets.h"
#include "chat.h" #include "chat.h"
#include "sound.h"
extern _point debug_field; extern _point debug_field;
extern int debug_lastping; extern int debug_lastping;
@ -591,11 +592,16 @@ do_bombdata (struct pkg_bombdata *b_dat, _net_addr * addr)
if ((bomb->pos.x != b_dat->x || bomb->pos.y != b_dat->y) && bomb->state == BS_exploding if ((bomb->pos.x != b_dat->x || bomb->pos.y != b_dat->y) && bomb->state == BS_exploding
&& b_dat->state != BS_exploding) && b_dat->state != BS_exploding)
d_printf ("do_bombdata WARNING : bomb explosion haven't finished\n"); d_printf ("do_bombdata WARNING : bomb explosion haven't finished\n");
if (bomb->state==BS_ticking && b_dat->state==BS_ticking) { // handle push & kick special if (bomb->state==BS_ticking && b_dat->state==BS_ticking) { // handle push & kick special
bman.bfield[bomb->pos.x][bomb->pos.y] = 0; //remove bomb at old location bman.bfield[bomb->pos.x][bomb->pos.y] = 0; //remove bomb at old location
draw_stone(bomb->pos.x,bomb->pos.y); draw_stone(bomb->pos.x,bomb->pos.y);
field_update(bomb->pos.x,bomb->pos.y); field_update(bomb->pos.x,bomb->pos.y);
} }
if (bomb->state==BS_off && (b_dat->state == BS_ticking || b_dat->state == BS_trigger))
snd_play (SND_bombdrop);
bomb->pos.x = b_dat->x; bomb->pos.x = b_dat->x;
bomb->pos.y = b_dat->y; bomb->pos.y = b_dat->y;
if (bomb->state != BS_ticking) if (bomb->state != BS_ticking)

Loading…
Cancel
Save