projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed pausing network games if the game already ended
[rocksndiamonds.git]
/
src
/
tools.c
diff --git
a/src/tools.c
b/src/tools.c
index 4fed1cd982a7223367deaee0ce8e1b2c26cb6327..c14445814bdcce85ab0ab3fd4e7b2f1090cf71e9 100644
(file)
--- a/
src/tools.c
+++ b/
src/tools.c
@@
-981,6
+981,8
@@
static void FadeExt(int fade_mask, int fade_mode, int fade_type)
draw_border_function);
redraw_mask &= ~fade_mask;
draw_border_function);
redraw_mask &= ~fade_mask;
+
+ ClearEventQueue();
}
static void SetScreenStates_BeforeFadingIn()
}
static void SetScreenStates_BeforeFadingIn()
@@
-2800,6
+2802,8
@@
void AnimateEnvelope(int envelope_nr, int anim_mode, int action)
SkipUntilDelayReached(&anim_delay, anim_delay_value, &i, last_frame);
}
SkipUntilDelayReached(&anim_delay, anim_delay_value, &i, last_frame);
}
+
+ ClearEventQueue();
}
void ShowEnvelope(int envelope_nr)
}
void ShowEnvelope(int envelope_nr)
@@
-3083,6
+3087,8
@@
void AnimateEnvelopeRequest(int anim_mode, int action)
SkipUntilDelayReached(&anim_delay, anim_delay_value, &i, last_frame);
}
SkipUntilDelayReached(&anim_delay, anim_delay_value, &i, last_frame);
}
+
+ ClearEventQueue();
}
void ShowEnvelopeRequest(char *text, unsigned int req_state, int action)
}
void ShowEnvelopeRequest(char *text, unsigned int req_state, int action)
@@
-3623,7
+3629,7
@@
void DrawNetworkPlayersExt(boolean force)
struct TextPosInfo *pos = &menu.main.network_players;
int tile_size = pos->tile_size;
struct TextPosInfo *pos = &menu.main.network_players;
int tile_size = pos->tile_size;
- int border_size =
2
;
+ int border_size =
pos->border_size
;
int xoffset_text = tile_size + border_size;
int font_nr = pos->font;
int font_width = getFontWidth(font_nr);
int xoffset_text = tile_size + border_size;
int font_nr = pos->font;
int font_width = getFontWidth(font_nr);
@@
-4564,6
+4570,7
@@
static boolean RequestDoor(char *text, unsigned int req_state)
/* pause network game while waiting for request to answer */
if (network.enabled &&
game_status == GAME_MODE_PLAYING &&
/* pause network game while waiting for request to answer */
if (network.enabled &&
game_status == GAME_MODE_PLAYING &&
+ !AllPlayersGone &&
req_state & REQUEST_WAIT_FOR_INPUT)
SendToServer_PausePlaying();
req_state & REQUEST_WAIT_FOR_INPUT)
SendToServer_PausePlaying();
@@
-4704,6
+4711,7
@@
static boolean RequestDoor(char *text, unsigned int req_state)
/* continue network game after request */
if (network.enabled &&
game_status == GAME_MODE_PLAYING &&
/* continue network game after request */
if (network.enabled &&
game_status == GAME_MODE_PLAYING &&
+ !AllPlayersGone &&
req_state & REQUEST_WAIT_FOR_INPUT)
SendToServer_ContinuePlaying();
req_state & REQUEST_WAIT_FOR_INPUT)
SendToServer_ContinuePlaying();
@@
-4730,6
+4738,7
@@
static boolean RequestEnvelope(char *text, unsigned int req_state)
/* pause network game while waiting for request to answer */
if (network.enabled &&
game_status == GAME_MODE_PLAYING &&
/* pause network game while waiting for request to answer */
if (network.enabled &&
game_status == GAME_MODE_PLAYING &&
+ !AllPlayersGone &&
req_state & REQUEST_WAIT_FOR_INPUT)
SendToServer_PausePlaying();
req_state & REQUEST_WAIT_FOR_INPUT)
SendToServer_PausePlaying();
@@
-4787,6
+4796,7
@@
static boolean RequestEnvelope(char *text, unsigned int req_state)
/* continue network game after request */
if (network.enabled &&
game_status == GAME_MODE_PLAYING &&
/* continue network game after request */
if (network.enabled &&
game_status == GAME_MODE_PLAYING &&
+ !AllPlayersGone &&
req_state & REQUEST_WAIT_FOR_INPUT)
SendToServer_ContinuePlaying();
req_state & REQUEST_WAIT_FOR_INPUT)
SendToServer_ContinuePlaying();
@@
-5419,6
+5429,8
@@
unsigned int MoveDoor(unsigned int door_state)
DrawMaskedBorder(REDRAW_DOOR_1);
DrawMaskedBorder(REDRAW_DOOR_2);
DrawMaskedBorder(REDRAW_DOOR_1);
DrawMaskedBorder(REDRAW_DOOR_2);
+ ClearEventQueue();
+
return (door1 | door2);
}
return (door1 | door2);
}