Summary: Unify UNIT_MOVE and UNIT_LOAD packets, allowing
transfer onto specific transport on adjacent tile
                 Project: Freeciv
            Submitted by: jtn
            Submitted on: Sat 14 Jun 2014 12:37:24 BST
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 



If you move a unit to an adjacent non-native tile containing more than one
transport, you don't get to choose which transport it loads onto; unit_move()
picks one for you.

To fix this I think we should unify UNIT_MOVE and UNIT_LOAD packets into a
single UNIT_MOVE packet:

PACKET_UNIT_MOVE = 66;cs, dsend
  UNIT unit_id;
  TILE tile;
  UNIT transporter_id;

tile can now legally be the unit's current tile (which will be used in
conjunction with 'transporter_id' for a normal 'load').

transporter_id can be a specific transport, or 0 indicating "at server's
discretion" -- server will pick a transport iff necessary, as unit_move() does

I wonder if we should unify UNIT_UNLOAD into this too. That would require
another value for transporter_id (or separate boolean) meaning explicitly 'no
transport'. It would also lose the ID of the transporter we're unloading from
in the current UNIT_UNLOAD packet -- I think that's only used for sanity
checking client state, is it very important?
Not sure that unifying UNIT_UNLOAD gains us much, though.

Would also need a corresponding change to the 'orders' packet format.

Not sure what the UI for cross-tile targeted transfers looks like. Since I
think this change has no benefit without the UI, I guess we need to work this
out first.


Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to