This is the mail archive of the
xconq7@sources.redhat.com
mailing list for the Xconq project.
network improvements
- From: Jim Kingdon <kingdon at panix dot com>
- To: xconq7 at sources dot redhat dot com
- Date: Wed, 20 Mar 2002 21:23:20 -0500 (EST)
- Subject: network improvements
Quick summary: Hans and I have been working on network code. The fix
I checked in yesterday seems to fix the "double click" problem that
Hans has been working on for a while. This should be a real fix,
rather than a hack as we've had before.
Hans, are you ready to remove the hack or did you want to look into
the dead unit stuff which we saw this morning some more?
2002-03-20 Jim Kingdon <kingdon@panix.com>
* kernel/ui.c (advance_into_cell): Remove double-click prevention
code. It doesn't seem to be needed with my tp.c changes of
yesterday.
Index: kernel/ui.c
===================================================================
RCS file: /cvs/xconq/xconq/kernel/ui.c,v
retrieving revision 1.71
diff -u -r1.71 ui.c
--- ui.c 2002/03/10 20:44:01 1.71
+++ ui.c 2002/03/21 02:20:33
@@ -2529,12 +2529,6 @@
cell/other unit, prepare a "most appropriate" action. */
/* (should share diff cell and same cell interaction code) */
-static time_t lasttime = 0;
-static Unit *lastunit = NULL;
-static Unit *lastother = NULL;
-static int lastx = -1;
-static int lasty = -1;
-
int
advance_into_cell(Side *side, Unit *unit, int x, int y, Unit *other,
HistEventType *reason)
@@ -2542,22 +2536,6 @@
int z, m, rslt = H_UNDEFINED;
time_t now;
- /* Filter out multiple rapid clicks on the same unit that caused
- synch errors in network games. */
- time(&now);
- if (lasttime && idifftime(now, lasttime) < 1
- && unit == lastunit
- && other == lastother
- && x == lastx
- && y ==lasty) {
- return TRUE; /* To avoid excessive beeping. */
- } else {
- lasttime = now;
- lastunit = unit;
- lastother = other;
- lastx = x;
- lasty = y;
- }
/* Make sure we have some default value. */
if (reason)
*reason = rslt;