Vanilla Development Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVS update: Vanilla/ntserv



Date:	Monday December 13, 1999 @ 15:18
Author:	xyzzy

Update of /home/netrek/cvsroot/Vanilla/ntserv
In directory swashbuckler.fortress.real-time.com:/var/tmp/cvs-serv1909

Modified Files:
	interface.c enter.c 
Log Message:
Ship cap packet generation wasn't correct, which messed up the Paradise
client.  Should generate correct packets now.


****************************************

Index: Vanilla/ntserv/interface.c
diff -u Vanilla/ntserv/interface.c:1.4 Vanilla/ntserv/interface.c:1.5
--- Vanilla/ntserv/interface.c:1.4	Tue Sep 21 00:02:24 1999
+++ Vanilla/ntserv/interface.c	Mon Dec 13 15:18:13 1999
@@ -541,25 +541,27 @@
     /* Notify client of new ship stats, if necessary */
 #ifndef ROBOT
     if ((F_ship_cap)&&(!sent_ship[type])) {
-      sent_ship[type] = 1;
-      ShipFoo.type = SP_SHIP_CAP;
-      ShipFoo.s_type = htons(me->p_ship.s_type);
-      ShipFoo.s_torpspeed = htons(me->p_ship.s_torpspeed);
-      ShipFoo.s_maxfuel = htonl(me->p_ship.s_maxfuel);
-      ShipFoo.s_maxspeed = htonl(me->p_ship.s_maxspeed);
-      ShipFoo.s_maxshield = htonl(me->p_ship.s_maxshield);
-      ShipFoo.s_maxdamage = htonl(me->p_ship.s_maxdamage);
-      ShipFoo.s_maxwpntemp = htonl(me->p_ship.s_maxwpntemp);
-      ShipFoo.s_maxegntemp = htonl(me->p_ship.s_maxegntemp);
-      ShipFoo.s_width = htons(me->p_ship.s_width);
-      ShipFoo.s_height = htons(me->p_ship.s_height);
-      ShipFoo.s_maxarmies = htons(me->p_ship.s_maxarmies);
-      ShipFoo.s_letter = me->p_ship.s_type;
-      ShipFoo.s_desig1 = shiptypes[type][0];
-      ShipFoo.s_desig2 = shiptypes[type][1];
-      ShipFoo.s_phaserrange = htons(me->p_ship.s_phaserdamage);
-      strcpy(ShipFoo.s_name,shipnames[me->p_ship.s_type]);
-      sendClientPacket((CVOID) &ShipFoo);
+	sent_ship[type] = 1;
+	ShipFoo.type = SP_SHIP_CAP;
+	ShipFoo.s_type = htons(me->p_ship.s_type);
+	ShipFoo.operation = 0;
+	ShipFoo.s_torpspeed = htons(me->p_ship.s_torpspeed);
+	ShipFoo.s_maxfuel = htonl(me->p_ship.s_maxfuel);
+	ShipFoo.s_maxspeed = htonl(me->p_ship.s_maxspeed);
+	ShipFoo.s_maxshield = htonl(me->p_ship.s_maxshield);
+	ShipFoo.s_maxdamage = htonl(me->p_ship.s_maxdamage);
+	ShipFoo.s_maxwpntemp = htonl(me->p_ship.s_maxwpntemp);
+	ShipFoo.s_maxegntemp = htonl(me->p_ship.s_maxegntemp);
+	ShipFoo.s_width = htons(me->p_ship.s_width);
+	ShipFoo.s_height = htons(me->p_ship.s_height);
+	ShipFoo.s_maxarmies = htons(me->p_ship.s_maxarmies);
+	ShipFoo.s_letter = "sdcbaog*"[me->p_ship.s_type];
+	ShipFoo.s_desig1 = shiptypes[type][0];
+	ShipFoo.s_desig2 = shiptypes[type][1];
+	ShipFoo.s_phaserrange = htons(me->p_ship.s_phaserdamage);
+	ShipFoo.s_bitmap = htons(me->p_ship.s_type);
+	strcpy(ShipFoo.s_name,shipnames[me->p_ship.s_type]);
+	sendClientPacket((CVOID) &ShipFoo);
     }
 #endif
     if (type != STARBASE && me->p_kills < plkills) {
Index: Vanilla/ntserv/enter.c
diff -u Vanilla/ntserv/enter.c:1.4 Vanilla/ntserv/enter.c:1.5
--- Vanilla/ntserv/enter.c:1.4	Fri Apr 30 15:18:43 1999
+++ Vanilla/ntserv/enter.c	Mon Dec 13 15:18:13 1999
@@ -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);
     }