Update of /cvsroot/netrek/client/netrekxp/src
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv1919/src

Modified Files:
	data.c local.c newwin.c option.c 
Log Message:
Rewrote det circle to work better for observers.

Index: newwin.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/newwin.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- newwin.c	22 May 2006 22:05:14 -0000	1.28
+++ newwin.c	23 May 2006 07:14:08 -0000	1.29
@@ -1414,8 +1414,9 @@
             FD_SET (sock, &rfds);
             if (udpSock >= 0)
                 FD_SET (udpSock, &rfds);
+            // For replacing select to cut down on cpu usage, but not working yet
             // HANDLE handles[FD_SETSIZE];
-           // WaitForMultipleObjects(32, handles, TRUE, INFINITE);
+            // WaitForMultipleObjects(32, handles, TRUE, INFINITE);
             select (32, &rfds, 0, 0, &tv);      /* hmm, 32 might be too small */
 
             if (FD_ISSET (sock, &rfds) ||

Index: local.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- local.c	22 May 2006 22:05:14 -0000	1.27
+++ local.c	23 May 2006 07:14:08 -0000	1.28
@@ -614,12 +614,6 @@
 
 }
 
-void
-DrawDetCircle()
-{
-    W_WriteCircle(w, WINSIDE/2, WINSIDE/2, DETDIST/SCALE, W_Red);
-}  
-
 static void
 DrawShips (void)
 {
@@ -1111,6 +1105,21 @@
                                dy - (shield_height / 2), shield, color, w);
 #endif
             }
+            /* Det circle */
+            if (detCircle)
+            {
+            	if (myPlayer(j) || isObsLockPlayer(j))
+            	{
+                   W_WriteCircle(w, WINSIDE/2, WINSIDE/2, DETDIST/SCALE, W_Red);
+                   olddetcircle = 1;
+                }
+                else if (olddetcircle && (me->p_flags & PFOBSERV) && !(me->p_flags & PFPLOCK))
+                {
+                   W_WriteCircle(w, WINSIDE/2, WINSIDE/2, DETDIST/SCALE, backColor);
+                   olddetcircle = 0;
+               }
+            }
+            
             if (j->p_flags & PFCLOAK)   /* when cloaked stop here */
                 continue;
 
@@ -2536,8 +2545,7 @@
         DrawStars();
 
     DrawShips ();
-    if (detCircle)
-        DrawDetCircle();
+
     DrawTorps ();
     DrawPlasmaTorps ();
 

Index: data.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- data.c	22 May 2006 08:27:53 -0000	1.25
+++ data.c	23 May 2006 07:14:08 -0000	1.26
@@ -61,6 +61,7 @@
                                  * system support */
 int niftyNewMessages = 1;
 unsigned int oldalert = 0;
+int olddetcircle = 0;
 int remap[16] = { 0, 1, 2, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0 };
 int messpend = 0;
 #ifdef XTRA_MESSAGE_UI

Index: option.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/option.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- option.c	22 May 2006 08:27:53 -0000	1.17
+++ option.c	23 May 2006 07:14:08 -0000	1.18
@@ -905,6 +905,7 @@
         else if (op->op_option == &detCircle && detCircle == 0)
         {
             W_WriteCircle(w, WINSIDE/2, WINSIDE/2, DETDIST/SCALE, backColor);
+            olddetcircle = 0;
         }
         else if (op->op_option == &partitionPlist)
             RedrawPlayerList ();