On Wed, 24 May 2006 williamb at its.caltech.edu wrote:
> Wed May 24 03:09:01 CDT 2006  williamb at its.caltech.edu
>   * Player position sign fix
>   * genspkt.c: With short packets on, positions in the negative (i.e. on player
>   death) were being reported incorrectly.

It looks to me, like they are still not reported correctly.

For other players, this should have no effect.  The SP code to send their
positions maps anything off the map to galactic,501,501.  It doesn't matter if
it's a negative number or a very large positive number.

For the player's own position with SP1, this shouldn't effect anything (for
the C99 standard, prior to that, it's not defined).  It just turns the data
from unsigned long -> signed long -> unsigned long.  Remeber that ntohl() and
htonl() both use unsigned longs.

For the player's own position and SP2, the values changes, but the client code
I've looked at all treats the data in the packet as unsigned short.  Here is
the code from COW:

          struct player_s2_spacket *pa2 = (struct player_s2_spacket *) sbuf;

          x = SCALE * ntohs(pa2->x);
          y = SCALE * ntohs(pa2->y);

Notice that it doesn't treat the value as signed.  What happened before your
change:

dead player position = -100000
data sent in SP2 packet = 0x5ca2 = 23714
client interpertation of SP2 data = 948560 (way outside galaxy)

After change:
dead player position = -100000
data sent in SP2 packet = 0xf63d = 63037
client interpertation of SP2 data = 2521480 (way way outside galaxy)

If you also change the clients to treat the data in the SP2 struct as
signed instead of unsigned, then you get:

dead player position = -100000
data sent in SP2 packet = 0xf63d = -2499
client interpertation of SP2 data = -99960

Close, but still different.