Update of /cvsroot/netrek/client/netrekxp/include In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv13252/include Modified Files: packets.h struct.h Log Message: Check on size of generic32 packet. New player field p_orbit, to hold planet# that server tells you that you are orbitting. Updated generic32 structure to include p_orbit. Index: packets.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/packets.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- packets.h 13 Dec 2006 00:00:00 -0000 1.3 +++ packets.h 13 Dec 2006 09:03:00 -0000 1.4 @@ -877,18 +877,16 @@ char type; /* SP_GENERIC_32 */ char version; /* alphabetic */ short repair_time; /* server estimate of repair time in seconds */ - char pad1[28]; + short pl_orbit; /* what planet player orbiting, -1 if none */ + char pad1[25]; }; +#define GENERIC_32_VERSION 'a' +#define GENERIC_32_LENGTH 32 /* versioning instructions: we start with version 'a', and each time a field is added increment the version and reduce the pad size, keeping the packet the same size ... client is entitled to trust - fields in struct that were defined at a particular version. */ - -/* - packet.type = SP_GENERIC_32; - packet.version = GENERIC_32_VERSION; - if (sizeof(struct generic_32_spacket) != GENERIC_32_LENGTH) abort(); + fields in struct that were defined at a particular version. */ Index: struct.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/struct.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- struct.h 13 Dec 2006 00:00:00 -0000 1.12 +++ struct.h 13 Dec 2006 09:03:00 -0000 1.13 @@ -252,7 +252,8 @@ * with */ float p_kills; /* Enemies killed */ short p_planet; /* Planet orbiting or locked - * onto */ + * onto, set only client */ + short pl_orbit; /* Planet orbiting, sent by server */ short p_playerl; /* Player locked onto */ #ifdef ARMY_SLIDER