From 3869800d4be81b6d342351db5788116917e68f66 Mon Sep 17 00:00:00 2001 From: stpohle Date: Wed, 14 Mar 2007 17:49:10 +0000 Subject: [PATCH] patch from Petr Gajdos... --- ChangeLog | 9 ++++++++- src/packets.c | 2 +- src/player.c | 8 ++++---- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 774c300..1e33ed6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,15 @@ -$Id: ChangeLog,v 1.119 2007/02/17 08:27:40 stpohle Exp $ +$Id: ChangeLog,v 1.120 2007/03/14 17:49:10 stpohle Exp $ Version 0.11.7.1 ================ +- Fixed BUG shown in: http://bugzilla.novell.com/show_bug.cgi?id=242031 + (patch from: Petr Gajdos) + In network game i wanted to use all the time a different bomb + instead of the first free aviable. In the code i forgot to modify + some values. This patch should fix it now. + (player.c:player_findfreebomb) changed i to nr. + - Fixed some drawing issues with flying bombs. - The last special item use was lost on clients in a network game. diff --git a/src/packets.c b/src/packets.c index 59e5826..792b24b 100644 --- a/src/packets.c +++ b/src/packets.c @@ -709,7 +709,7 @@ do_field (struct pkg_field *f_dat, _net_addr * addr) if (f_dat->x < map.size.x && f_dat->y < map.size.y) { /* convert the fielddata */ - map.field[f_dat->x][f_dat->y].type = f_dat->type; + map.field[f_dat->x][f_dat->y].type = f_dat->type; CHECK_BFIELD::: FOR BOMBS::::: map.field[f_dat->x][f_dat->y].mixframe = f_dat->mixframe; map.field[f_dat->x][f_dat->y].special = f_dat->special; for (i = 0; i < 4; i++) { /* set the explosion field data */ diff --git a/src/player.c b/src/player.c index 3086aeb..7eea127 100644 --- a/src/player.c +++ b/src/player.c @@ -1,4 +1,4 @@ -/* $Id: player.c,v 1.104 2006/08/20 20:01:15 stpohle Exp $ +/* $Id: player.c,v 1.105 2007/03/14 17:49:11 stpohle Exp $ * player.c - everything what have to do with the player */ #include @@ -873,7 +873,7 @@ player_findfreebomb (_player * player) if (nr < 0 || nr >= MAX_BOMBS) // i out of range .. restart at bomb 0 nr -= MAX_BOMBS; - if (player->bombs[i].state == BS_off) { /* check if this bomb is free */ + if (player->bombs[nr].state == BS_off) { /* check if this bomb is free */ if (res == -1) res = i; } @@ -881,8 +881,8 @@ player_findfreebomb (_player * player) bombused++; // count number of used bombs } - if (res == -1 && i == player->bomb_lastex && player->bombs[i].state == BS_off) - res = i; + if (res == -1 && nr == player->bomb_lastex && player->bombs[nr].state == BS_off) + res = nr; if (bombused >= player->bombs_n) res = -1; /* all max number of bombs lay */