public inbox for xconq7@sourceware.org
 help / color / mirror / Atom feed
* delay key broke
@ 2004-08-23  4:55 Jim Kingdon
  2004-08-23 23:00 ` Eric McDonald
  2004-08-24 18:00 ` Eric McDonald
  0 siblings, 2 replies; 3+ messages in thread
From: Jim Kingdon @ 2004-08-23  4:55 UTC (permalink / raw)
  To: xconq7

Sometime in the last few days the "d" (delay) key broke.

That is, I am in move mode, I hit "d".  I expect the delay flag to go
on and the current unit to switch to something else.  Instead, nothing
seems to happen.  I can work around this by switching to survey mode,
selecting another unit with the mouse, and then working with that
unit.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: delay key broke
  2004-08-23  4:55 delay key broke Jim Kingdon
@ 2004-08-23 23:00 ` Eric McDonald
  2004-08-24 18:00 ` Eric McDonald
  1 sibling, 0 replies; 3+ messages in thread
From: Eric McDonald @ 2004-08-23 23:00 UTC (permalink / raw)
  To: Jim Kingdon; +Cc: xconq7

On Mon, 23 Aug 2004, Jim Kingdon wrote:

> Sometime in the last few days the "d" (delay) key broke.

Probably my doing, as I was mucking around with the scheduler on 
Saturday. I will look into it tonight.

Eric

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: delay key broke
  2004-08-23  4:55 delay key broke Jim Kingdon
  2004-08-23 23:00 ` Eric McDonald
@ 2004-08-24 18:00 ` Eric McDonald
  1 sibling, 0 replies; 3+ messages in thread
From: Eric McDonald @ 2004-08-24 18:00 UTC (permalink / raw)
  To: Jim Kingdon; +Cc: xconq7

[-- Attachment #1: Type: text/plain, Size: 208 bytes --]

Attached is a patch that reverts the formations fix in order to unbreak 
the delay command. I didn't have time to investigate the details of 
where things were breaking.

Sorry for the inconvenience,
   Eric

[-- Attachment #2: revert.diff --]
[-- Type: text/plain, Size: 5528 bytes --]

? Build.log
? BuildErrors.log
? BuildWarnings.log
? BuildWarningsOnly.log
? Install.log
? PATCHES
? autom4te.cache
? revert-formations
? runbuild.sh
? runconfig.sh
? images/wreckr-stock
? kernel/DEVEL
? kernel/PATCHES
? kernel/run.c.diff1
? lib/DEVEL
? lib/Xconq.Warnings
? lib/bellum2-rul.g
? lib/bellum2-t.g
? lib/bellum2-u.g
? lib/bellum2.g
? lib/knights.g
? lib/wreckr-m.g
? lib/wreckr-u.g
? sdl/tlspatch
? tcltk/DEVEL
Index: ChangeLog
===================================================================
RCS file: /cvs/xconq/xconq/ChangeLog,v
retrieving revision 1.1474
diff -r1.1474 ChangeLog
16,30d15
< 	Fix scheduling bug caused by the use of formations. Also, 
< 	slightly streamline the formations code.
< 	* kernel.h (is_in_formation): New prototype.
< 	* plan.c (is_in_formation): New function. Is the given unit 
< 	presently in a formation and at the correct distance with respect 
< 	to the formation leader?
< 	* run.c (side_move_some_units): Count number of units in formation. 
< 	Only move an unit that is attempting to maintain formation if that 
< 	unit is out of formation. Do not claim that an unit has been found 
< 	to move, when that unit has not been moved; making the claim causes 
< 	problems when formation movement is in effect. Ensure that the 
< 	'waitingfortasks' flag is set on any formation units so that the 
< 	"auto next unit" UI code will be sure to pick them up and let the 
< 	player move them if they have leftover ACP after moving in formation.
< 
Index: kernel/run.c
===================================================================
RCS file: /cvs/xconq/xconq/kernel/run.c,v
retrieving revision 1.103
diff -r1.103 run.c
577,583c577,584
< 	/* Check that the side can research something. */
< 	for_all_advance_types(a) {
< 	    if (side_can_research(side, a)) {
< 		/* Popup the research dialog if the side has a 
< 		   display. */
< 		if (side_has_display(side)) {
< 		    update_research_display(side);
---
> 	    /* Check that the side can research something. */
> 	    for_all_advance_types(a) {
> 		if (side_can_research(side, a)) {
> 			/* Popup the research dialog if the side has a display. */
> 			if (side_has_display(side)) {
> 				update_research_display(side);
> 			}
> 			return TRUE;
585d585
< 		return TRUE;
587d586
< 	}
657,658c656,657
< 	        && ((unit->act->initacp > 0)
< 	            || acp_indep(unit))) {
---
> 	        && (unit->act->initacp > 0
> 	              || acp_indep(unit))) {
668,674c667,670
< 		    	/* The busy flag should have been cleared when the unit 
< 			   moved. If it is still set, it could mean that a 
< 			   broadcasted action was never received by the host 
< 		    	   and rebroadcasted. */
< 			Dprintf(
< "Busy flag still set for %s at start of turn.\n", 
< 				unit_desig(unit));
---
> 		    	/* The busy flag should have been cleared when the unit moved. If it is still
> 		    	set, it could mean that a broadcasted action was never received by the host 
> 		    	and rebroadcasted. */
> 			Dprintf("Busy flag still set for %s at start of turn.\n", unit_desig(unit));
757c753
<     int num, foundanytomove, curactor0, curactor, numdelayed, numfollowing;
---
>     int num, foundanytomove, curactor0, curactor, numdelayed;
776d771
<     numfollowing = 0;
794,796d788
< 	/* Count the units which are in formations and can still act. */
< 	if (unit->plan && unit->plan->formation && unit_still_acting(unit))
< 	  ++numfollowing;
809,810c801
< 	    && (unit->plan && unit->plan->formation
< 		&& !is_in_formation(unit))) {
---
> 	    && (unit->plan && unit->plan->formation)) {
825d815
< 	/* Execute any tasks or pending actions that the unit has. */
831,834c821,822
< 	    if (has_pending_action(unit) || (unit->plan && unit->plan->tasks)) {
< 		num += move_one_unit_multiple(unit, lim - num);
< 		foundanytomove = TRUE;
< 	    }
---
> 	    num += move_one_unit_multiple(unit, lim - num);
> 	    foundanytomove = TRUE;
836d823
< #if (0)
840d826
< #endif
879,888d864
<     /* Set waiting-for-tasks to true for any units in a formation, which 
<        still are acting (have ACP, are not skipped, etc...). */
<     if (numfollowing > 0) {
< 	for (curactor = 0; curactor < av->numunits; ++curactor) {
< 	    unit = unit_in_vector(av, curactor);
< 	    if (unit->plan && unit->plan->formation 
< 		&& unit_still_acting(unit) && !(unit->plan->tasks))
< 	      set_waiting_for_tasks(unit, TRUE);
< 	}
<     }
909,921c885,897
<     if (unit->plan
< 	 && (unit->plan->asleep
< 	    || unit->plan->reserve))
<       return FALSE;
<     /* Conditions that require further action provided
<        that it was not ruled out above. */
<     if (acp_indep(unit)
< 	 && can_build(unit)
< 	 && !unit->buildingdone)
<       return TRUE;
<     if (has_pending_action(unit))
<       return TRUE;
<     if (unit->plan)
---
> 	if (unit->plan
> 	     && (unit->plan->asleep
> 	     	|| unit->plan->reserve))
> 		return FALSE;
> 	/* Conditions that require further action provided
> 	that it was not ruled out above. */
> 	if (acp_indep(unit)
> 	     && can_build(unit)
> 	     && !unit->buildingdone)
> 		return TRUE;
> 	if (has_pending_action(unit))
> 		return TRUE;
> 	if (unit->plan)
1007,1008c983
< 		    /* ... and independent units if we have brainless 
< 		       building ... */
---
> 		    /* ... and independent units if we have brainless building ... */
1010,1011c985
< 		    /* ... and human-cotrolled units that are not waiting for 
< 		       tasks. */
---
> 		    /* ... and human-cotrolled units that are not waiting for tasks. */

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-08-24  3:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-23  4:55 delay key broke Jim Kingdon
2004-08-23 23:00 ` Eric McDonald
2004-08-24 18:00 ` Eric McDonald

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).