team mode completed prepared for last test before release

origin
stpohle 21 years ago
parent 449d70b6a8
commit 5dc3a23a9f

@ -1,8 +1,9 @@
$Id: ChangeLog,v 1.89 2004/12/05 19:43:34 stpohle Exp $
$Id: ChangeLog,v 1.90 2004/12/13 21:29:29 stpohle Exp $
* FINISH TEAM MODE.
* FINISH TEAM MODE - counting points.
* Team Data won't be send by changes.
- Fixed: Teamdata wasn't send right, net_send_playerid changed,
send_playerdata and do_playerdata fixed.
- Fixed: Problems with the second local player join and
leaving. Also the second local player won't get
@ -14,10 +15,16 @@ $Id: ChangeLog,v 1.89 2004/12/05 19:43:34 stpohle Exp $
part of the explosion_restore function. Explosion
was growing on slow PC more as one field per cycle.
- AI Player die on a slow computer because they move more
- AI: Player die on a slow computer because they move more
as 1 Field. This might be also the problem Acidjnk told
me about.
Variable dir_change added so we won't have
anymore so many suicides.
little more work on the AI, there are still some kind of
problems. Maybe i'll rewrite the whole AI again.
- fixed: Server starts the game soo fast that the
client's ignore the gamestat for a running game.
Check if all players are ready.
@ -34,16 +41,8 @@ $Id: ChangeLog,v 1.89 2004/12/05 19:43:34 stpohle Exp $
- fixed: AI won't have anymore so many suicide deaths.
- Variable dir_change added so we won't have
anymore so many suicides.
- Playermenu (Playerselection changed again)
- New Team menu Handling.
- little work on the AI, there are still some kind of
problems. Maybe i'll rewrite the whole AI again.
- changed: Playermenu (F2 in the Playerselection screen).
You will see some details about the other players and
you can go to the teammenu from here.

@ -5,7 +5,7 @@ dnl Please disable it in the Anjuta project configuration
AC_INIT(configure.in)
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE(bomberclone, 0.11.4test3)
AM_INIT_AUTOMAKE(bomberclone, 0.11.4)
AM_CONFIG_HEADER(config.h)

@ -1,4 +1,4 @@
/* $Id: network.h,v 1.21 2004/11/07 04:13:09 stpohle Exp $
/* $Id: network.h,v 1.22 2004/12/13 21:29:30 stpohle Exp $
* network.h file... for everything what have to do with the network stuff
*/
@ -101,7 +101,7 @@ extern int network_server_port (char *server, char *host, int hostlen, char *por
extern void network_shutdown ();
extern int network_init ();
extern int network_loop ();
extern void net_change_playerid (int pl_nr);
extern void net_send_playerid (int pl_nr);
extern void net_new_game ();
extern void net_transmit_gamedata ();
extern void net_game_send_player (int p_nr);

@ -1,4 +1,4 @@
/* $Id: game.c,v 1.104 2004/12/01 21:47:59 stpohle Exp $
/* $Id: game.c,v 1.105 2004/12/13 21:29:30 stpohle Exp $
game.c - procedures for the game. */
#include <string.h>
@ -427,6 +427,7 @@ game_end ()
if (bman.gametype == GT_team) {
int t_nr;
bman.lastwinner = -1;
cnt_left = 0;
for (t_nr = 0; t_nr < MAX_TEAMS; t_nr++) for (i = 0; i < MAX_PLAYERS; i++) {
@ -435,10 +436,10 @@ game_end ()
if (bman.lastwinner != t_nr) {
teams[t_nr].wins++;
cnt_left++;
}
bman.lastwinner = t_nr;
}
}
}
if (cnt_left == 1) {
/* set the points */

@ -1,4 +1,4 @@
/* $Id: mapmenu.c,v 1.24 2004/09/12 20:54:24 stpohle Exp $ */
/* $Id: mapmenu.c,v 1.25 2004/12/13 21:29:31 stpohle Exp $ */
/* map/tileset selection menu */
#include "bomberclone.h"
@ -153,6 +153,7 @@ mapmenu ()
map.size.y = MAX_FIELDSIZE_Y;
config_write ();
if (GT_MP_PTPM) net_send_servermode ();
}

@ -1,4 +1,4 @@
/* $Id: multiwait.c,v 1.52 2004/11/30 14:30:36 stpohle Exp $
/* $Id: multiwait.c,v 1.53 2004/12/13 21:29:31 stpohle Exp $
multiwait.c - this manages only the network screen where
everyone have to select it's players and where even the basic chat is inside
*/
@ -28,17 +28,6 @@ extern int UpdateRects_nr;
extern int blitdb_nr;
/* returns number of active players in a team
static int mw_team_is_used (int t_nr) {
int i,j=0;
for(i=0;i<MAX_PLAYERS;i++)
if ((teams[t_nr].players[i]!=NULL) && (PS_IS_used(teams[t_nr].players[i]->state))) { j++;}
d_printf("Team: %s : %d players\n",teams[t_nr].name,j);
return j;
}
*/
/* this will load some graphics and so other stuff */
static void mw_init ()
{

@ -1,4 +1,4 @@
/* $Id: network.c,v 1.70 2004/12/05 19:43:37 stpohle Exp $ */
/* $Id: network.c,v 1.71 2004/12/13 21:29:31 stpohle Exp $ */
/*
network routines.
*/
@ -419,11 +419,11 @@ draw_netupdatestate (char st)
used to update settings at startup
*/
void
net_change_playerid (int pl_nr)
net_send_playerid (int pl_nr)
{
int i;
d_printf ("net_change_playerid pl_nr:%d\n", pl_nr);
d_printf ("net_send_playerid pl_nr:%d\n", pl_nr);
if (GT_MP_PTPM) {
/*

@ -367,7 +367,7 @@ do_playerid (struct pkg_playerid *p_id, _net_addr * addr)
/* Send all connected players the new PlayerID */
if (GT_MP_PTPM && GS_WAITRUNNING && addr->pl_nr >= 0 && addr->pl_nr < MAX_PLAYERS)
net_change_playerid (addr->pl_nr);
net_send_playerid (addr->pl_nr);
}
// d_playerdetail ("*** PLAYER List ***");
@ -697,6 +697,7 @@ send_playerdata (_net_addr * addr, int p_nr, _player * pl)
p_dat.frame = HTON16 (FTOI16 (pl->frame));
p_dat.p_nr = p_nr;
p_dat.ready = pl->ready;
p_dat.team_nr = pl->team_nr;
send_pkg ((struct pkg *) &p_dat, addr);
};
@ -722,6 +723,7 @@ do_playerdata (struct pkg_playerdata *p_dat, _net_addr * addr)
if (bman.state == GS_running && bman.p_nr != p_dat->p_nr) {
pl->points = NTOH16 (p_dat->points);
pl->dead_by = NTOH16 (p_dat->dead_by);
pl->team_nr = p_dat->team_nr;
}
else if (bman.state != GS_running || bman.p_nr != p_dat->p_nr) {
pl->pos.x = I16TOF (NTOH16 (p_dat->pos.x));

@ -1,4 +1,4 @@
/* $Id: player.c,v 1.95 2004/12/05 19:43:37 stpohle Exp $
/* $Id: player.c,v 1.96 2004/12/13 21:29:31 stpohle Exp $
* player.c - everything what have to do with the player */
#include <SDL.h>
@ -841,7 +841,7 @@ player_set_gfx (_player * p, signed char gfx_nr)
p->gfx = &gfx.players[gfx_nr];
p->state |= PSF_playing;
}
if (GT_MP) net_change_playerid (p-players);
if (GT_MP) net_send_playerid (p-players);
};

@ -1,4 +1,4 @@
/* $Id: playermenu.c,v 1.14 2004/12/05 19:43:37 stpohle Exp $
/* $Id: playermenu.c,v 1.15 2004/12/13 21:29:31 stpohle Exp $
*/
#include "bomberclone.h"
@ -313,7 +313,7 @@ void playermenu () {
}
if (done == 1 && menu->focus->id == 2) { /* create ai player */
net_change_playerid (single_create_ai (1));
net_send_playerid (single_create_ai (1));
done = 0;
}
@ -326,6 +326,8 @@ void playermenu () {
done = 0;
players[sel_pl_nr].team_nr = teammenu_select (&players[sel_pl_nr]);
bman.updatestatusbar = 1;
if (GT_MP)
net_send_playerid (sel_pl_nr);
}
if (done == 1 && menu->focus->id == 4) { /* kick player */
@ -340,6 +342,7 @@ void playermenu () {
} while ((done == 0 || menu->focus->id != 5) && done != -1);
team_update ();
if (GT_SP || GT_MP_PTPM)
ai_team_choosegfx ();
menu_delete (menu);

@ -1,4 +1,4 @@
/* $Id: single.c,v 1.80 2004/11/30 14:30:37 stpohle Exp $ */
/* $Id: single.c,v 1.81 2004/12/13 21:29:31 stpohle Exp $ */
/* single player */
#include "basic.h"
@ -490,7 +490,7 @@ single_create_ai (int num_players)
try,
gfx_sel,
i = 0;
_player *pl;
_player *pl = NULL;
for (count = 0; count < num_players; count++) {
/* find free players */

Loading…
Cancel
Save