projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-19981024-1
[rocksndiamonds.git]
/
src
/
network.c
diff --git
a/src/network.c
b/src/network.c
index 28a7d892925fddf13bf43153a15c13856c3df75d..a58c6621eb1b1a3e43975a9c1577101f9a6f5e4c 100644
(file)
--- a/
src/network.c
+++ b/
src/network.c
@@
-62,7
+62,7
@@
int nread = 0, nwrite = 0;
static void sysmsg(char *s)
{
static void sysmsg(char *s)
{
- if (verbose)
+ if (
options.
verbose)
{
printf("** %s\n", s);
fflush(stdout);
{
printf("** %s\n", s);
fflush(stdout);
@@
-88,7
+88,7
@@
static void flushbuf()
static void sendbuf(int len)
{
static void sendbuf(int len)
{
- if (network)
+ if (
options.
network)
{
realbuf[0] = realbuf[1] = realbuf[2] = 0;
realbuf[3] = (unsigned char)len;
{
realbuf[0] = realbuf[1] = realbuf[2] = 0;
realbuf[3] = (unsigned char)len;
@@
-139,7
+139,7
@@
static void StartNetworkServer(int port)
switch (fork())
{
case 0:
switch (fork())
{
case 0:
- NetworkServer(port, serveronly);
+ NetworkServer(port,
options.
serveronly);
/* never reached */
exit(0);
/* never reached */
exit(0);
@@
-147,7
+147,7
@@
static void StartNetworkServer(int port)
case -1:
Error(ERR_RETURN,
"cannot create network server process - no network games");
case -1:
Error(ERR_RETURN,
"cannot create network server process - no network games");
- network = FALSE;
+
options.
network = FALSE;
return;
default:
return;
default:
@@
-156,7
+156,7
@@
static void StartNetworkServer(int port)
}
}
}
}
-
BOOL
ConnectToServer(char *host, int port)
+
boolean
ConnectToServer(char *host, int port)
{
struct hostent *hp;
struct sockaddr_in s;
{
struct hostent *hp;
struct sockaddr_in s;
@@
-498,7
+498,7
@@
static void Handle_OP_START_PLAYING()
- if (autorecord_on)
+ if (
setup.
autorecord_on)
TapeStartRecording();
TapeStartRecording();
@@
-568,7
+568,7
@@
static void Handle_OP_MOVE_FIGURE(unsigned int len)
/* copy valid player actions */
for (i=0; i<MAX_PLAYERS; i++)
/* copy valid player actions */
for (i=0; i<MAX_PLAYERS; i++)
-
network_player_action[i]
=
+
stored_player[i].action
=
(i < len - 6 && stored_player[i].active ? buf[6 + i] : 0);
network_player_action_received = TRUE;
(i < len - 6 && stored_player[i].active ? buf[6 + i] : 0);
network_player_action_received = TRUE;