mirror of
https://github.com/tstellar/bygfoot.git
synced 2024-12-15 09:54:52 +01:00
"Minor fixes."
This commit is contained in:
parent
c99435c214
commit
a161a09249
@ -628,7 +628,7 @@ game_find_to_substitute(gint clid, const Team *tm)
|
||||
num_def = math_get_place(current_structure, 3);
|
||||
|
||||
for(i=0;i<11;i++)
|
||||
if(player_card_get(player_of_idx_team(tm, i), clid, PLAYER_VALUE_CARD_RED) <= 0)
|
||||
if(!player_is_banned(player_of_idx_team(tm, i)))
|
||||
g_ptr_array_add(players, player_of_idx_team(tm, i));
|
||||
|
||||
g_ptr_array_sort_with_data(players, (GCompareDataFunc)player_compare_func,
|
||||
|
@ -189,7 +189,7 @@ lg_commentary_get_commentaries(gint event_type)
|
||||
g_ptr_array_add(commentaries, g_string_new(_("It's a pinball in the penalty box, finally spinning off P1 across the line")));
|
||||
g_ptr_array_add(commentaries, g_string_new(_("Oh that's a great shot and it's deflected off P1 and into the back of the net")));
|
||||
g_ptr_array_add(commentaries, g_string_new(_("P1 passes the ball back to his goalie, oh no the keepers missed it! It's an own goal by P1!")));
|
||||
g_ptr_array_add(commentaries, g_string_new(_("That little missunderstanding has cost T2 a goal")));
|
||||
g_ptr_array_add(commentaries, g_string_new(_("That little missunderstanding has cost TT a goal")));
|
||||
break;
|
||||
case LIVE_GAME_EVENT_HEADER:
|
||||
g_ptr_array_add(commentaries, g_string_new(_("P2 chips the ball towards P1 who heads the ball towards goal")));
|
||||
@ -271,7 +271,7 @@ lg_commentary_get_commentaries(gint event_type)
|
||||
break;
|
||||
case LIVE_GAME_EVENT_FOUL_RED_INJURY:
|
||||
g_ptr_array_add(commentaries, g_string_new(_("P2 fouls and the stretcher bearers come racing on with P1 lying in agony on the turf")));
|
||||
g_ptr_array_add(commentaries, g_string_new(_("Foul by P2; P1 seems to have broken something.. he might have to be substituted")));
|
||||
g_ptr_array_add(commentaries, g_string_new(_("Foul by P2; P1 seems to be injured... he might have to be substituted")));
|
||||
break;
|
||||
case LIVE_GAME_EVENT_SEND_OFF:
|
||||
g_ptr_array_add(commentaries, g_string_new(_("P1 has been sent off")));
|
||||
|
@ -45,6 +45,7 @@ live_game_calculate_fixture(Fixture *fix)
|
||||
&usr(fixture_user_team_involved(fix)).options));
|
||||
|
||||
stat2 = fixture_user_team_involved(fix);
|
||||
statp = match;
|
||||
|
||||
if(show && window.live == NULL)
|
||||
window.live = window_create(WINDOW_LIVE);
|
||||
@ -553,6 +554,8 @@ live_game_event_scoring_chance(void)
|
||||
|
||||
if(last_unit.event.type != LIVE_GAME_EVENT_OWN_GOAL)
|
||||
live_game_event_duel();
|
||||
else
|
||||
live_game_event_general(TRUE);
|
||||
}
|
||||
|
||||
/** Calculate a penalty event. */
|
||||
|
@ -494,13 +494,15 @@ player_move(Team *tm1, gint player_number, Team *tm2, gint insert_at)
|
||||
void
|
||||
player_swap(Team *tm1, gint player_number1, Team *tm2, gint player_number2)
|
||||
{
|
||||
gint clid = -1;
|
||||
gint move = (tm1 == tm2 && player_number1 < player_number2) ?
|
||||
-1 : 1;
|
||||
|
||||
if(stat0 == STATUS_LIVE_GAME_PAUSE)
|
||||
{
|
||||
if((player_number1 < 11 && player_is_banned(player_of_idx_team(tm1, player_number1)) > 0) ||
|
||||
(player_number2 < 11 && player_is_banned(player_of_idx_team(tm1, player_number2)) > 0))
|
||||
clid = usr(stat2).live_game.fix->clid;
|
||||
if((player_number1 < 11 && player_is_banned(player_of_idx_team(tm1, player_number1))) ||
|
||||
(player_number2 < 11 && player_is_banned(player_of_idx_team(tm2, player_number2))))
|
||||
{
|
||||
game_gui_show_warning("You can't replace a banned player.");
|
||||
return;
|
||||
|
@ -338,6 +338,13 @@ team_get_fixture(const Team *tm, gboolean last_fixture)
|
||||
Fixture *next_fix = NULL,
|
||||
*last_fix = NULL;
|
||||
|
||||
if(!last_fixture &&
|
||||
(stat0 == STATUS_LIVE_GAME_PAUSE ||
|
||||
stat0 == STATUS_SHOW_LIVE_GAME) &&
|
||||
(tm == ((LiveGame*)statp)->fix->teams[0] ||
|
||||
tm == ((LiveGame*)statp)->fix->teams[1]))
|
||||
return ((LiveGame*)statp)->fix;
|
||||
|
||||
for(i=0;i<ligs->len;i++)
|
||||
{
|
||||
if(lig(i).id == tm->clid)
|
||||
|
Loading…
Reference in New Issue
Block a user