projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-19981012-1
[rocksndiamonds.git]
/
src
/
tools.c
diff --git
a/src/tools.c
b/src/tools.c
index f987d323a2f550c0b778f3eda9e4fd1ec268daa9..aefd540aceac4e01b33b34b0b05261a4c36ed93e 100644
(file)
--- a/
src/tools.c
+++ b/
src/tools.c
@@
-23,6
+23,7
@@
#include "buttons.h"
#include "joystick.h"
#include "cartoons.h"
#include "buttons.h"
#include "joystick.h"
#include "cartoons.h"
+#include "network.h"
#include <math.h>
#include <math.h>
@@
-613,7
+614,7
@@
void DrawGraphicThruMask(int x, int y, int graphic)
#if DEBUG
if (!IN_SCR_FIELD(x,y))
{
#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;
}
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;
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);
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();
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)
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);
}
return(result);
}