Re: negative research points, was Re: [Freeciv-Dev] Some remarks (bugs?)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
David Pfitzner wrote:
>
> Actually, I think part of the problem here is that player.researched
> (the amount of research done so far) is sent as a 16 bit quantity, so it
> probably didn't (and couldn't) underflow on the server (freeciv
> assumes 32 bit ints, in various places, I believe), but the value
> received by the client wrapped around.
>
> I'm not sure of the best way to change these 16 bits values to 32
> bits in packets in a backwardly compatable way. We could use
> capabilities, (which involves some CPU hit each time we make/receive
> a packet and test the capabilities?)
I don't think it will be a noticable hit. If profiling reveals
that checking every time is a problem, then we could have a boolean
(set from the capabilities on (re)load and (re)connect
which indicated if the other side wanted 16 or 32 bits.
I think it's unlikely that capabilities will change during
a game, unless there's a reconnect or a reload, so the bool
could be set then.
> Or we can just leave it be for now.
I think we should leave it for now unless someone wants to
look at it. If they do, I think it should be done with
capabilities, rather than extra fields. (What will a new
client or server do if the other side isn't sending the
extra 32 bits? It needs to test capabilities anyway..)
> Of course when we break protocol compatability (planned for 1.8)
> we could tidy this up.
Yeah, by changing the packet. We could put a /* FIXME */ in
the code, as I generally look for them before a release.
Regards,
Mitch.
- Re: [Freeciv-Dev] Some remarks (bugs?) and an update of greek city names., (continued)
- Re: [Freeciv-Dev] Some remarks (bugs?) and an update of greek city names., Rizos Sakellariou, 1998/12/03
- Re: [Freeciv-Dev] Some remarks (bugs?) and an update of greek city names., David Pfitzner, 1998/12/03
- Re: [Freeciv-Dev] Some remarks (bugs?) and an update of greek city names., Trent Piepho, 1998/12/03
- Re: [Freeciv-Dev] Some remarks (bugs?) and an update of greek city names., John Goerzen, 1998/12/03
- Re: [Freeciv-Dev] Some remarks (bugs?) and an update of greek city names., Mitch Davis, 1998/12/03
- Re: [Freeciv-Dev] Some remarks (bugs?) and an update of greek city names., Tony &, 1998/12/03
- Re: [Freeciv-Dev] Some remarks (bugs?) and an update of greek city names., David Pfitzner, 1998/12/03
- [Freeciv-Dev] diplcost (was: Some remarks (bugs?) and an update of greek city names), Reinier Post, 1998/12/03
- Re: [Freeciv-Dev] Some remarks (bugs?) and an update of greek city names., Mitch Davis, 1998/12/03
negative research points, was Re: [Freeciv-Dev] Some remarks (bugs?)..., David Pfitzner, 1998/12/04
- Re: negative research points, was Re: [Freeciv-Dev] Some remarks (bugs?)...,
Mitch Davis <=
|
|