[Freeciv-Dev] (PR#6735) Server crashed upgrading a frigate
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=6735 >
> [jdorje - Thu Nov 13 20:41:32 2003]:
>
> > [i-freeciv-lists@xxxxxxxxxxxxx - Mon Nov 10 18:47:17 2003]:
> > The
> > solution is one unified function. The attached patch implementes this.
>
> I don't like this either, though. upgrade_unit is a server function and
> shouldn't be called from the common code. Adding a stub to the client
> is bad.
To clarify: the way you have things written unit_upgrade (a test-and-set
function in the common code) calls upgrade_unit (the "set" part of the
operation, in server and client) if it is given certain parameters. The
client must guarantee that it never gives these parameters, since the
client's can never call upgrade_unit. This is extemely bad IMO.
Nor by doing this do we cut down on the duplicated rules. The rules are
still duplicated in upgrade_unit and unit_upgrade. For instance
upgrade_unit does not reassign any transported units, and thus
unit_upgrade must check to make sure the transport capacity is large enough.
jason
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#6735) Server crashed upgrading a frigate,
Jason Short <=
|
|