Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2003:
[Freeciv-Dev] Re: (PR#6200) disbanding a transporter must move its cargo
Home

[Freeciv-Dev] Re: (PR#6200) disbanding a transporter must move its cargo

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#6200) disbanding a transporter must move its cargo
From: "Rafa³ Bursig" <bursig@xxxxxxxxx>
Date: Sat, 20 Sep 2003 06:48:42 -0700
Reply-to: rt@xxxxxxxxxxxxxx

Hi All

I must sorry all that I start this transport discusion and don't take 
part of this (state of my health is still far from stability :) )

> Currently there are two flags: F_CARRIER and F_MISSILE_CARRIER.  These
> 
> *seem* to work as so:
> 
> C  MC
> 0  0    ground units transporter
> 1  0    air & missile transporter
> 0  1    missile-only transporter
> 1  1    missile-only transporter
> 
> I'd rather see them done as completely independent flags:
> 
>    F_LAND_CARRIER
>    F_SEA_CARRIER
>    F_AIR_CARRIER
>    F_HELO_CARRIER
>    F_MISSILE_CARRIER
F_PARA_CARRIER
With this we can allow make paradrop from "carrier" or other sea/land 
transport.

Ok but returning to transport code...

1) Disbanding transport.
I like simple solutions then lets forbide disbanding transport that 
carry units. Players should unload all units manualy before disbanding 
transport.

The only problem will be when transporter is disband by game (lack of 
resources to support it), then all units should be unloaded or lost 
(sea transport)

2) Sub Transports
When we have 4 units :
A is land unit + F_MISSILE_CARRIER
B is sea unit + F_LAND_CARRIER (can't carry missile)
C and D are missile units (are loaded on A)

Now what happend when we want transport A on B ?

IMHO This should look like :
- transporter unit should have "current_payload" field.

- Only  A should be loaded to B => A->transported_by = B->id (C and D 
still should be loaded on A => C/D->transported_by = a->id) but b-
> current_payload should be inc. by 3 (A + C + D) == (1 + (A-
> current_payload)

- unload A from B will automaticaly "unload" C and D becouse they still 
be loaded on A.

- "current_payload" should be send to client.

3) Removing "bool carried" field from send_unit_info_to_onlookers(...) 
function parms. and add this inside this function as :
bool carried = punit->transported_by != -1;

4) Client should use "transported_by" filed as boolean...
We send "carried" info to client but we don't save this info in unit.

if (packet->carried) {
   punit->transported_by = 1;
} else {
   punit->transported_by = 0;
}

this allow fix some draw bugs when we transport some units.

Rafal




[Prev in Thread] Current Thread [Next in Thread]