Vanilla List Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ship cap packets, part 2
I tried out the patched server at fedora, but it still didn't like my client!
I figured out that the server sends ship cap packets in _two_ places, once
during a refit and again when entering the game from the MOTD. The code to
generate the packet is duplicated (poor style, IMHO). This patch makes the
same fixes to enter.c
Index: enter.c
===================================================================
RCS file: /home/netrek/cvsroot/Vanilla/ntserv/enter.c,v
retrieving revision 1.4
diff -u -r1.4 enter.c
--- enter.c 1999/04/30 20:18:43 1.4
+++ enter.c 1999/08/28 04:35:54
@@ -70,6 +70,7 @@
sent_ship[s_type] = 1;
ShipFoo.type = SP_SHIP_CAP;
ShipFoo.s_type = htons(myship->s_type);
+ ShipFoo.operation = 0;
ShipFoo.s_torpspeed = htons(myship->s_torpspeed);
ShipFoo.s_maxfuel = htonl(myship->s_maxfuel);
ShipFoo.s_maxspeed = htonl(myship->s_maxspeed);
@@ -80,10 +81,11 @@
ShipFoo.s_width = htons(myship->s_width);
ShipFoo.s_height = htons(myship->s_height);
ShipFoo.s_maxarmies = htons(myship->s_maxarmies);
- ShipFoo.s_letter = myship->s_type;
+ ShipFoo.s_letter = "sdcbaog*"[myship->s_type];
ShipFoo.s_desig1 = shiptypes[s_type][0];
ShipFoo.s_desig2 = shiptypes[s_type][1];
ShipFoo.s_phaserrange = htons(myship->s_phaserdamage);
+ ShipFoo.s_bitmap = htons(myship->s_type);
strcpy(ShipFoo.s_name,shipnames[myship->s_type]);
sendClientPacket((CVOID) &ShipFoo);
}