Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2003:
[Freeciv-Dev] (PR#5789) Don't send info about transported units to clien
Home

[Freeciv-Dev] (PR#5789) Don't send info about transported units to clien

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: bursig@xxxxxxxxx
Subject: [Freeciv-Dev] (PR#5789) Don't send info about transported units to clients without shared vision.
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 5 Sep 2003 06:12:31 -0700
Reply-to: rt@xxxxxxxxxxxxxx

[bursig - Wed Sep  3 09:23:05 2003]:

> Hi All
> 
> This code add restriction in sending transported units info only to
> owner player (plus all players that owner player give shared vision)
> and transport owner (plus all players that transport owner player give
> shared vision) for rest players this unit is hidden in transport unit
> (remove unit package is send in enter transport phase)
> 
> Additionaly this patch allow sending to client transported_by info and
> unload code search in units loaded on transport , not in units with
> sentry activity.

I think you're taking the opposite approach to what should be done. 
Rather than tell the client all units, and for each unit give a
transported_by field, the server needs to NOT tell the client about the
transported units, but for each transportER unit should tell the client
if it is "occupied".

The way you have it, a cheating client can, well, cheat...

I disagree with Per, though: we don't have to do a full cleanup of the
server to do this.  All we need is a localized piece of code to
determine with reasonable accuracy whether a transporter is occupied. 
I'd say if there are any transported_by units on the tile, you might as
well mark all transports as occupied.  Ultimately, it doesn't really
matter to the client which unit is on which transporter since he can't
see those units anyway.

Another question, however, is whether we should just give an occupied
field (boolean) or give the number of units occupying the transporter. 
The later gives the client a little more information that it can't
easily use, and makes the logic at the server a little harder.

Thischange conflicts with the packet_short_unit one - the occupied field
is needed in PACKET_SHORT_UNIT but not in PACKET_UNIT, I believe.

jason



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