From 9ac3481a6d137d597c1b1d7f3d03b6c24cb737d0 Mon Sep 17 00:00:00 2001 From: gyboth Date: Sun, 11 Jan 2009 15:24:26 +0000 Subject: [PATCH] Fixed the horses problem. --- src/debug.c | 1 + src/player.c | 5 +++-- src/xml_loadsave_leagues_cups.c | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/debug.c b/src/debug.c index 3f8d398a..e4a1aa08 100644 --- a/src/debug.c +++ b/src/debug.c @@ -164,6 +164,7 @@ debug_action(const gchar *text) "pospref \t change recruiting pref\n" "goto \t Press 'new week' automatically until\n" " \t the appropriate week is reached\n" + " \t Supply 100+X to go to season X (e.g. 102)\n" "testcom|tc \t Test a specific live game commentary.\n" " \t Find the numbers in live_game_struct.h (LiveGameEventType)\n" " \t Use 'goto' afterwards.\n" diff --git a/src/player.c b/src/player.c index a7ff7246..4b812654 100644 --- a/src/player.c +++ b/src/player.c @@ -1261,8 +1261,9 @@ player_remove_contract(Player *pl) printf("player_remove_contract\n"); #endif - user_event_add(user_from_team(pl->team), EVENT_TYPE_PLAYER_LEFT, -1, -1, NULL, - pl->name); + if(debug < 50) + user_event_add(user_from_team(pl->team), EVENT_TYPE_PLAYER_LEFT, -1, -1, NULL, + pl->name); player_remove_from_team(pl->team, player_id_index(pl->team, pl->id)); } diff --git a/src/xml_loadsave_leagues_cups.c b/src/xml_loadsave_leagues_cups.c index 57e9e1aa..922b53fb 100644 --- a/src/xml_loadsave_leagues_cups.c +++ b/src/xml_loadsave_leagues_cups.c @@ -25,9 +25,11 @@ #include "cup.h" #include "file.h" +#include "fixture.h" #include "free.h" #include "league_struct.h" #include "misc.h" +#include "table.h" #include "team.h" #include "xml.h" #include "xml_loadsave_cup.h" @@ -210,7 +212,7 @@ xml_loadsave_leagues_cups_write(const gchar *prefix) void xml_loadsave_leagues_cups_adjust_team_ptrs(void) { - gint i, j, k, l; + gint i, j, k; GPtrArray *team_ptrs; for(i = 0; i < ligs->len; i++)