rnd-19981013-3
[rocksndiamonds.git] / src / network.c
index db7fc95f980d13811ac05718e16a5eff50959ffd..82f406d61382f39df2fa06fc15870d5497a5e989 100644 (file)
@@ -98,7 +98,7 @@ static void flushbuf()
 
 static void sendbuf(int len)
 {
-  if (!standalone)
+  if (network)
   {
     realbuf[0] = realbuf[1] = realbuf[2] = 0;
     realbuf[3] = (unsigned char)len;
@@ -156,7 +156,7 @@ static void StartNetworkServer(int port)
     case -1:
       Error(ERR_RETURN,
            "cannot create network server process - no network games");
-      standalone = TRUE;
+      network = FALSE;
       return;
 
     default:
@@ -516,6 +516,9 @@ static void Handle_OP_MOVE_FIGURE()
   int frame_nr;
   int i;
 
+  if (!network_playing)
+    return;
+
   frame_nr =
     (buf[2] << 24) | (buf[3] << 16) | (buf[4] << 8) | (buf[5]);
 
@@ -640,9 +643,6 @@ void HandleNetworking()
   fd_set rfds;
   int r = 0;
 
-  if (standalone)
-    return;
-
   flushbuf();
 
   FD_ZERO(&rfds);