[Freeciv-Dev] (PR#15091) Assert fail on connect order
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=15091 >
When trying to connect with irrigation starting on a hill tile with a
mine, the client will dump core with an assert fail.
I think I've tracked this down to an inconsistency between the connect
turn-counting code (which doesn't want to destroy mines) and the can-
we-connect check (which doesn't check for this), and was able to make
the problem go away by adding a check for whether the unit is on a
square with a mine in can_unit_do_connect() (in control.c in the client
directory).
I'm seeing this in the XAW client, but it looks to me like the problem
is in code that all clients would use.
diff -c says:
========
*** freeciv-2.0.7/client/control.c Tue Oct 18 15:06:15 2005
--- freeciv-2.0.7-local-changes/client/control.c Sat Jan 7 18:41:34 2006
***************
*** 665,672 ****
--- 665,674 ----
case ACTIVITY_IRRIGATE:
/* Special case for irrigation: only irrigate to make S_IRRIGATION,
* never to transform tiles. */
+ /* Additional special case: Connect will never destroy mines. */
return (terrain_control.may_irrigate
&& unit_flag(punit, F_SETTLERS)
+ && !tile_has_special(punit->tile, S_MINE)
&& (tile_has_special(punit->tile, S_IRRIGATION)
|| (terrain == ttype->irrigation_result
&& is_water_adjacent_to_tile(punit->tile)
========
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#15091) Assert fail on connect order,
Dave Vandervies <=
|
|