triggerbombs will explode now after 15 secs

origin
patty21 23 years ago
parent 722578ebe5
commit 99e6f0e899

@ -9,11 +9,21 @@
#define GAME_SPECIAL_ITEMSHOE 10
#define GAME_SPECIAL_ITEMDEATH 25
#define GAME_SPECIAL_ITEMMIXED 10
#define GAME_SPECIAL_ITEMSTRIGGER 2
#define GAME_SPECIAL_ITEMSTRIGGER 10
#define GAME_SPECIAL_ITEMSROW 2
#define GAME_SPECIAL_ITEMSPUSH 2
#define GAME_SPECIAL_ITEMSKICK 0
#define GAME_SPECIAL_ITEMSLIQUID 0
#define GAME_SPECIAL_ITEMSDESTROY 0
#define EXPLOSION_SAVE_DISTANCE 64
#define SPECIAL_TRIGGER_TIMEOUT 15
#define SPECIAL_TRIGGER_NUMUSE 5 // 0=unlimited
#define SPECIAL_ROW_TIME 100
#define SPECIAL_PUSH_TIME 100
#define SPECIAL_KICK_NUMUSE 5
#define SPECIAL_LIQUID_NUMUSE 5
#define SPECIAL_DESTROY_NUMUSE 5
#define START_BOMBS 1
#define START_RANGE 2

@ -79,6 +79,7 @@ bomb_loop ()
bomb = &player->bombs[i];
switch (bomb->state){
case BS_ticking:
case BS_trigger:
if (GT_MP_PTPM || bman.gametype == GT_single) {
if (--bomb->to == 0) // bomb will have to explode in the next loop
bomb_explode (p, i, 1);
@ -87,16 +88,15 @@ bomb_loop ()
}
else {
if (--bomb->to == 0) { // bomb did not explode -> resend bombdata
if (bomb->state==BS_ticking)
bomb->to = BOMB_TIMEOUT * TIME_FACTOR;
else
bomb->to = SPECIAL_TRIGGER_TIMEOUT * TIME_FACTOR;
net_game_send_bomb (bman.p_nr, i);
bomb->to = bomb->to + ((2 * RESENDCACHE_RETRY) / TIME_FACTOR);
}
draw_bomb (bomb);
}
b++; // Count ticking Bombs for Return value
break;
case BS_trigger:
draw_bomb (bomb);
b++; // Count ticking Bombs for Return value
break;
case BS_exploding:

@ -358,13 +358,15 @@ player_drop_bomb (int pl_nr)
d_printf ("Player %d Dropped Bomb %d\n", bman.p_nr, i);
bomb->r = player->range;
if (player->special == SP_trigger)
if (player->special == SP_trigger) {
bomb->state = BS_trigger;
else
bomb->to = SPECIAL_TRIGGER_TIMEOUT * TIME_FACTOR; // 5 Secs * 200
}
else {
bomb->state = BS_ticking;
bomb->ex_nr = -1;
bomb->to = BOMB_TIMEOUT * TIME_FACTOR; // 5 Secs * 200
}
bomb->ex_nr = -1;
bman.bfield[bomb->pos.x][bomb->pos.y] = 1;
if (bman.gametype != GT_single) {
net_game_send_bomb (pl_nr, i);

@ -24,6 +24,7 @@ special_trigger (int p_nr)
if (p_nr == bman.p_nr && GT_MP_PTP && z)
net_game_send_special (p_nr, ex_nr);
if (z)
bman.last_ex_nr = ex_nr + 6;
}

Loading…
Cancel
Save