X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftools.c;h=aefd540aceac4e01b33b34b0b05261a4c36ed93e;hb=b454c38f3381978b6813eb06c736adaa38c55b89;hp=f987d323a2f550c0b778f3eda9e4fd1ec268daa9;hpb=2fe0fbc2a34fd4b50081f1829931dea3ca2c4c1c;p=rocksndiamonds.git diff --git a/src/tools.c b/src/tools.c index f987d323..aefd540a 100644 --- a/src/tools.c +++ b/src/tools.c @@ -23,6 +23,7 @@ #include "buttons.h" #include "joystick.h" #include "cartoons.h" +#include "network.h" #include @@ -613,7 +614,7 @@ void DrawGraphicThruMask(int x, int y, int graphic) #if DEBUG if (!IN_SCR_FIELD(x,y)) { - printf("DrawGraphicThruMask(): x = %d, y = %d\n",x,y); + printf("DrawGraphicThruMask(): x = %d,y = %d, graphic = %d\n",x,y,graphic); printf("DrawGraphicThruMask(): This should never happen!\n"); return; } @@ -1307,6 +1308,10 @@ BOOL Request(char *text, unsigned int req_state) int mx,my, ty, result = -1; unsigned int old_door_state; + /* pause network game while waiting for request to answer */ + if (!standalone && game_status == PLAYING && req_state & REQUEST_WAIT_FOR) + SendToServer_PausePlaying(); + old_door_state = GetDoorState(); CloseDoor(DOOR_CLOSE_1); @@ -1390,9 +1395,7 @@ BOOL Request(char *text, unsigned int req_state) OpenDoor(DOOR_OPEN_1); ClearEventQueue(); - if (!(req_state & REQ_ASK) && - !(req_state & REQ_CONFIRM) && - !(req_state & REQ_PLAYER)) + if (!(req_state & REQUEST_WAIT_FOR)) return(FALSE); if (game_status != MAINMENU) @@ -1531,6 +1534,10 @@ BOOL Request(char *text, unsigned int req_state) } } + /* continue network game after request */ + if (!standalone && game_status == PLAYING && req_state & REQUEST_WAIT_FOR) + SendToServer_ContinuePlaying(); + return(result); }