From 99e6f0e8993a7ab209d37e179b107a248019ccb9 Mon Sep 17 00:00:00 2001 From: patty21 Date: Thu, 29 May 2003 00:55:39 +0000 Subject: [PATCH] triggerbombs will explode now after 15 secs --- src/basic.h | 12 +++++++++++- src/bomb.c | 10 +++++----- src/player.c | 12 +++++++----- src/special.c | 1 + 4 files changed, 24 insertions(+), 11 deletions(-) diff --git a/src/basic.h b/src/basic.h index ddb5746..c81675f 100644 --- a/src/basic.h +++ b/src/basic.h @@ -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 diff --git a/src/bomb.c b/src/bomb.c index 4ad3695..46e8704 100644 --- a/src/bomb.c +++ b/src/bomb.c @@ -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,7 +88,10 @@ bomb_loop () } else { if (--bomb->to == 0) { // bomb did not explode -> resend bombdata - bomb->to = BOMB_TIMEOUT * TIME_FACTOR; + 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); } @@ -95,10 +99,6 @@ bomb_loop () } 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: if (bomb->to > 0) { do_explosion (p, i); diff --git a/src/player.c b/src/player.c index cb00bef..084b897 100644 --- a/src/player.c +++ b/src/player.c @@ -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->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); diff --git a/src/special.c b/src/special.c index 7bcc5cc..911145e 100644 --- a/src/special.c +++ b/src/special.c @@ -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; }