<URL: http://bugs.freeciv.org/Ticket/Display.html?id=40759 >
> > - Perhaps the values of the unit upkeep field should be > > sent in unit info packets so that they do not have to > > be recomputed at the client side. > > I will look into this. Should this be something like in the attached file (unit_upkeep_packages.patch.diff)? Or are additional changes needed?
diff -ur freeciv-2.1.99svn15584.gold//common/packets.def freeciv-2.1.99svn15584.unit_upkeep//common/packets.def --- freeciv-2.1.99svn15584.gold//common/packets.def 2009-03-23 20:47:57.000000000 +0100 +++ freeciv-2.1.99svn15584.unit_upkeep//common/packets.def 2009-04-12 11:57:22.082023611 +0200 @@ -747,6 +747,7 @@ PLAYER owner; COORD x,y; CITY homecity; + UINT16 upkeep[O_MAX]; UINT8 veteran; BOOL ai, paradropped; diff -ur freeciv-2.1.99svn15584.gold//server/unittools.c freeciv-2.1.99svn15584.unit_upkeep//server/unittools.c --- freeciv-2.1.99svn15584.gold//server/unittools.c 2009-03-23 20:47:57.000000000 +0100 +++ freeciv-2.1.99svn15584.unit_upkeep//server/unittools.c 2009-04-12 11:57:22.874025827 +0200 @@ -1827,6 +1827,7 @@ packet->x = punit->tile->x; packet->y = punit->tile->y; packet->homecity = punit->homecity; + packet->upkeep = punit->upkeep; packet->veteran = punit->veteran; packet->type = utype_number(unit_type(punit)); packet->movesleft = punit->moves_left;
_______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev