Index: client/clinet.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/clinet.c,v retrieving revision 1.69 diff -u -r1.69 clinet.c --- client/clinet.c 2002/04/09 14:10:09 1.69 +++ client/clinet.c 2002/05/15 20:01:42 @@ -105,6 +105,7 @@ set_client_state(CLIENT_PRE_GAME_STATE); agents_disconnect(); + game_init(); } /************************************************************************** Index: common/game.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/game.c,v retrieving revision 1.139 diff -u -r1.139 game.c --- common/game.c 2002/04/30 12:52:54 1.139 +++ common/game.c 2002/05/15 20:01:43 @@ -695,8 +695,8 @@ game.nbarbarians = 0; game.occupychance= GAME_DEFAULT_OCCUPYCHANCE; - geff_vector_init(&game.effects); - ceff_vector_init(&game.destroyed_effects); + geff_vector_reinit(&game.effects); + ceff_vector_reinit(&game.destroyed_effects); game.heating = 0; game.cooling = 0; @@ -742,9 +742,9 @@ map_init(); idex_init(); - conn_list_init(&game.all_connections); - conn_list_init(&game.est_connections); - conn_list_init(&game.game_connections); + conn_list_reinit(&game.all_connections); + conn_list_reinit(&game.est_connections); + conn_list_reinit(&game.game_connections); for(i=0; ilist); } +void SPECLIST_FOO(_list_reinit) (SPECLIST_LIST * tthis) +{ + SPECLIST_FOO(_list_unlink_all) (tthis); + SPECLIST_FOO(_list_init) (tthis); +} + int SPECLIST_FOO(_list_size) (SPECLIST_LIST *tthis) { return genlist_size(&tthis->list); Index: common/specvec.h =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/specvec.h,v retrieving revision 1.2 diff -u -r1.2 specvec.h --- common/specvec.h 2002/03/05 10:07:10 1.2 +++ common/specvec.h 2002/05/15 20:01:43 @@ -64,6 +64,7 @@ }; void SPECVEC_FOO(_vector_init) (SPECVEC_VECTOR *tthis); +void SPECVEC_FOO(_vector_reinit) (SPECVEC_VECTOR *tthis); void SPECVEC_FOO(_vector_reserve) (SPECVEC_VECTOR *tthis, int n); size_t SPECVEC_FOO(_vector_size) (SPECVEC_VECTOR *tthis); SPECVEC_TYPE *SPECVEC_FOO(_vector_get) (SPECVEC_VECTOR *tthis, int index); Index: common/specvec_c.h =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/specvec_c.h,v retrieving revision 1.3 diff -u -r1.3 specvec_c.h --- common/specvec_c.h 2002/03/05 10:07:10 1.3 +++ common/specvec_c.h 2002/05/15 20:01:43 @@ -44,6 +44,14 @@ ath_init(&tthis->vector, sizeof(SPECVEC_TYPE)); } +void SPECVEC_FOO(_vector_reinit) (SPECVEC_VECTOR * tthis) +{ + if (SPECVEC_FOO(_vector_size) (tthis)) { + SPECVEC_FOO(_vector_free) (tthis); + } + SPECVEC_FOO(_vector_init) (tthis); +} + void SPECVEC_FOO(_vector_reserve) (SPECVEC_VECTOR *tthis, int n) { ath_minnum(&tthis->vector, n);