Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2004:
[Freeciv-Dev] Re: (PR#8672) punit->occupy has no value at the server
Home

[Freeciv-Dev] Re: (PR#8672) punit->occupy has no value at the server

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#8672) punit->occupy has no value at the server
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 31 May 2004 08:46:49 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8672 >

Gregory Berkolaiko wrote:

> Is this code
> ======================================
> diff -u -r1.210 unit.c
> --- common/unit.c     19 May 2004 00:49:31 -0000      1.210
> +++ common/unit.c     23 May 2004 22:39:57 -0000
> @@ -654,8 +654,7 @@
>    }
>  
>    /* Make sure there's room in the transporter. */
> -  return (get_transporter_occupancy(ptrans)
> -       < get_transporter_capacity(ptrans));
> +  return (ptrans->occupancy < get_transporter_capacity(ptrans));
>  }
> ======================================
> going to work in the cleint?
> What is the value of the occupancy filed in the server and in the
> client?  Maybe you should write a few words for HACKING.

get_transporter_capacity will work in the client but only for your and 
allied units.  For enemy units the client doesn't know about the cargo 
so it will always return 0.

jason




[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: (PR#8672) punit->occupy has no value at the server, Jason Short <=