[Freeciv-Dev] Re: Patch: Limited player information to client
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Wed, 20 Dec 2000, Thue wrote:
> On Tuesday 19 December 2000 18:46, Marko Lindqvist wrote:
> > On Tue, 19 Dec 2000, Marko Lindqvist wrote:
> > > Send only information player is allowed to know conserning about other
> > > players.
> >
> > This version makes more sense concerning shared vision treaties.
> >
>
> -Why did you add all that code to send_player_info() instead of just using
> send_player_info_c()
Becose I wrote send_player_info() way before send_player_info_c() :)
...and desperately tried to find a way to use it while writing
send_player_info_c(). (Why am I feeling extremely stupid now?)
There might be some speed considerations, but it's hard to believe they
would have any real effect. I'll fix this.
> -You should add an assert in diplhand.c where you say you know the player who
> initiated the meeting has an embassy already
ok.
> -You should not send a players global worklists to anyone except the player
> himself no matter what the infolevel.
Information of level INFO_FULL is sent only to player himself
(player.connections) and global observers. I think it's agreed that
observers have right to see all information concerning player they are
attached to or, in case of global observers, about all players. Of course,
I don't see observers having any need for worklists, but just sending
them makes things a bit less complicated. I'll look this one too, though.
> -You should send information about the revolution state to players with
> embassy
You mean revolution counter? Client does not currently have any use for
(opponents) revolution counter. I don't think opponent should know how
long it will take before my revolution ends (in fact, neither should I...)
You can tell that opponent is going through revolution when his government
is anarchy (and this is sent at infolevel INFO_MEETING).
> -Your handling of shared vision information seem unclear.
It should be quite identical to embassy information handling. (Is it
unclear too?)
> -Mostly for artistic points: You send the player id as an int, but uses
> almost exclusively the player pointer. It seems to me you should use the
> player pointer as an argument to your functions. Also, use
Ok
> players_iterate(pplayer) macro.
Ok, I were unaware of this macro.
> Your indentation is misleading in send_player_info_c().
?? Tab somewhere?
> And lastly, I personally prefer
> conn_list_iterate {
> ...
> } conn_list_iterate_end;
> to
> conn_list_iterate;
> ...
> conn_list_iterate_end;
In fact, so do I :)
I just copied (and modified) this part of code from somewhere and this
seemed to be 'accepted' way of doing it. I'm glad to change this.
Caz
--
|
|