From modemhero at users.sourceforge.net Tue Jun 2 21:42:57 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 03 Jun 2009 02:42:57 +0000 Subject: [netrek-cvs] client/netrekxp clientr.vcproj,1.15,1.16 Message-ID: Update of /cvsroot/netrek/client/netrekxp In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14506 Modified Files: clientr.vcproj Log Message: Add support for SP_LTD, still buggy. Added include/ltd_stats.h to source. Some minor formatting and fprintf fixes. Change unknown ranks to blank. Index: clientr.vcproj =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/clientr.vcproj,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- clientr.vcproj 21 May 2009 02:37:28 -0000 1.15 +++ clientr.vcproj 3 Jun 2009 02:42:54 -0000 1.16 @@ -1631,6 +1631,10 @@ + + + + From modemhero at users.sourceforge.net Tue Jun 2 21:42:57 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 03 Jun 2009 02:42:57 +0000 Subject: [netrek-cvs] client/netrekxp/src data.c, 1.124, 1.125 feature.c, 1.31, 1.32 playerlist.c, 1.19, 1.20 socket.c, 1.66, 1.67 Message-ID: Update of /cvsroot/netrek/client/netrekxp/src In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14506/src Modified Files: data.c feature.c playerlist.c socket.c Log Message: Add support for SP_LTD, still buggy. Added include/ltd_stats.h to source. Some minor formatting and fprintf fixes. Change unknown ranks to blank. Index: playerlist.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/playerlist.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- playerlist.c 25 May 2009 14:43:53 -0000 1.19 +++ playerlist.c 3 Jun 2009 02:42:55 -0000 1.20 @@ -1127,11 +1127,11 @@ case 'C': /* Curt (short) Rank */ if (paradise) //format (buffPoint, (j->p_stats2.st_royal == 0 ? ranks2[j->p_stats2.st_rank].name : royal[j->p_stats2.st_royal].name), 10, 0); - format (buffPoint, "UNKN", 4, 0); + format (buffPoint, "", 4, 0); else { if (j->p_stats.st_rank >= nranks) - format (buffPoint, "UNKN", 4, 0); + format (buffPoint, "", 4, 0); else format (buffPoint, ranks[j->p_stats.st_rank].cname, 4, 0); } @@ -1144,7 +1144,7 @@ else { if (j->p_stats.st_rank >= nranks) - format (buffPoint, "Unknown! ", 10, 0); + format (buffPoint, "", 10, 0); else format (buffPoint, ranks[j->p_stats.st_rank].name, 10, 0); } Index: feature.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/feature.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- feature.c 26 May 2009 02:18:17 -0000 1.31 +++ feature.c 3 Jun 2009 02:42:55 -0000 1.32 @@ -104,7 +104,9 @@ {"TERRAIN", &F_terrain, 'S', 1, 0, 0}, /* armies in paradise ship_cap_spacket */ {"ARMIES_IN_SHIPCAP", &F_armies_shipcap, 'S', 1, 0, 0}, + {"AUTO_WEAPONS", &F_auto_weapons, 'S', 1, 0, 0}, {"SP_RANK", &F_sp_rank, 'S', 1, 0, 0}, + {"SP_LTD", &F_sp_ltd, 'S', 1, 0, 0}, {0, 0, 0, 0, 0, 0} }; Index: socket.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/socket.c,v retrieving revision 1.66 retrieving revision 1.67 diff -u -d -r1.66 -r1.67 --- socket.c 30 May 2009 16:03:38 -0000 1.66 +++ socket.c 3 Jun 2009 02:42:55 -0000 1.67 @@ -198,6 +198,7 @@ {sizeof (struct feature_cpacket), handleFeature}, /* CP_FEATURE; 60 */ #endif {sizeof (struct rank_spacket), handleRank}, /* SP_RANK */ + {sizeof (struct ltd_spacket), handleLtd}, /* SP_LTD */ }; int sizes[] = { @@ -2838,6 +2839,113 @@ ranks[i].offense = (float) (ntohl (packet->offense) / 100.0); } +static void +dump_prefix(const char *abbr, const char *name) +{ + LineToConsole("%-10s %-30s ", abbr, name); +} + +#define dump_stat(STAT) { \ + LineToConsole(" %8u\n", (unsigned int) ltd->STAT); \ +} + +#define dump_max(STAT) { \ + LineToConsole(" %8u\n", (unsigned int) ltd->STAT); \ +} + +void +handleLtd (struct ltd_spacket *packet) +{ + struct ltd_stats *ltd; + if (packet->version != LTD_VERSION) return; + if (packet->endian != 'l') return; + + ltd = &packet->ltd; + + LineToConsole("SP_LTD test output begins\n"); + dump_prefix("kt", "kills total"); dump_stat(kills.total); + dump_prefix("kmax", "kills max"); dump_max(kills.max); + dump_prefix("k1", "kills first"); dump_stat(kills.first); + dump_prefix("k1p", "kills first potential"); dump_stat(kills.first_potential); + dump_prefix("k1c", "kills first converted"); dump_stat(kills.first_converted); + dump_prefix("k2", "kills second"); dump_stat(kills.second); + dump_prefix("k2p", "kills second potential"); dump_stat(kills.second_potential); + dump_prefix("k2c", "kills second converted"); dump_stat(kills.second_converted); + dump_prefix("kbp", "kills by phaser"); dump_stat(kills.phasered); + dump_prefix("kbt", "kills by torp"); dump_stat(kills.torped); + dump_prefix("kbs", "kills by smack"); dump_stat(kills.plasmaed); + dump_prefix("dt", "deaths total"); dump_stat(deaths.total); + dump_prefix("dpc", "deaths as potential carrier"); dump_stat(deaths.potential); + dump_prefix("dcc", "deaths as converted carrier"); dump_stat(deaths.converted); + dump_prefix("ddc", "deaths as dooshed carrier"); dump_stat(deaths.dooshed); + dump_prefix("dbp", "deaths by phaser"); dump_stat(deaths.phasered); + dump_prefix("dbt", "deaths by torp"); dump_stat(deaths.torped); + dump_prefix("dbs", "deaths by smack"); dump_stat(deaths.plasmaed); + dump_prefix("acc", "actual carriers created"); dump_stat(deaths.acc); + dump_prefix("ptt", "planets taken total"); dump_stat(planets.taken); + dump_prefix("pdt", "planets destroyed total"); dump_stat(planets.destroyed); + dump_prefix("bpt", "bombed planets total"); dump_stat(bomb.planets); + dump_prefix("bp8", "bombed planets <=8"); dump_stat(bomb.planets_8); + dump_prefix("bpc", "bombed planets core"); dump_stat(bomb.planets_core); + dump_prefix("bat", "bombed armies total"); dump_stat(bomb.armies); + dump_prefix("ba8", "bombed_armies <= 8"); dump_stat(bomb.armies_8); + dump_prefix("bac", "bombed armies core"); dump_stat(bomb.armies_core); + dump_prefix("oat", "ogged armies total"); dump_stat(ogged.armies); + dump_prefix("odc", "ogged dooshed carrier"); dump_stat(ogged.dooshed); + dump_prefix("occ", "ogged converted carrier"); dump_stat(ogged.converted); + dump_prefix("opc", "ogged potential carrier"); dump_stat(ogged.potential); + dump_prefix("o>c", "ogged bigger carrier"); dump_stat(ogged.bigger_ship); + dump_prefix("o=c", "ogged same carrier"); dump_stat(ogged.same_ship); + dump_prefix("oy) ); break; case SP_WARNING : /* like SP_MESG */ - fprintf(stderr,"\nS->C SP_WARNING\t"); + LineToConsole("\nS->C SP_WARNING\t"); if (log_packets > 1) LineToConsole(" mesg=\"%s\",", ((struct warning_spacket *) packet)->mesg); break; case SP_MOTD : /* line from .motd screen */ - fprintf(stderr,"\nS->C SP_MOTD\t"); + LineToConsole("\nS->C SP_MOTD\t"); if (log_packets > 1) LineToConsole(" line=\"%s\",", ((struct motd_spacket *) packet)->line); @@ -5223,7 +5331,7 @@ * request */ LineToConsole("\nS->C SP_S_REPLY\t"); if (log_packets > 1) - fprintf(stderr," repl=%d, windside=%u, gwidth=%ld,", + LineToConsole(" repl=%d, windside=%u, gwidth=%ld,", ((struct shortreply_spacket *) packet)->repl, ntohs(((struct shortreply_spacket *) packet)->winside), ntohl(((struct shortreply_spacket *) packet)->gwidth) ); @@ -5318,6 +5426,33 @@ ntohl(((struct rank_spacket *) packet)->offense), ((struct rank_spacket *) packet)->cname ); break; + case SP_LTD : + LineToConsole("\nS->C SP_LTD\t"); + if (log_packets > 1) + { + LineToConsole(" version='%c', endian='%c', pad='%c',\n", + ((struct ltd_spacket *) packet)->version, + ((struct ltd_spacket *) packet)->endian, + ((struct ltd_spacket *) packet)->pad ); + switch (((struct ltd_spacket *) packet)->version) + { + case LTD_VERSION: + { + struct ltd_stats *ltd = &(((struct ltd_spacket *)packet)->ltd); + unsigned char *ptr = (unsigned char *) ltd; + int i; + + for (i = 0; i < sizeof(struct ltd_stats); i++) + { + if (i%20 == 0) + LineToConsole("\n"); + LineToConsole(" %02x ", ptr[i]); + } + } + LineToConsole("\n"); + } + } + break; #ifdef SHORT_PACKETS case SP_S_TORP : /* variable length torp * * * packet */ @@ -5351,7 +5486,6 @@ plpacket->armies, ntohs(plpacket->flags) ); } - fprintf(stderr,"\n"); break; case SP_GPARAM : LineToConsole("\nS->C SP_GPARAM\t"); @@ -5391,7 +5525,6 @@ LineToConsole("pnum = %d, kills = %d ",pnum, kills); } } - fprintf(stderr,"\n"); break; case SP_S_STATS : /* see SP_STATS */ LineToConsole("\nS->C SP_S_STATS\t"); @@ -5415,7 +5548,7 @@ #endif default: LineToConsole("\nS->C UNKNOWN\t"); - if(log_packets > 1) + if (log_packets > 1) LineToConsole(" type=%d,",packet[0]); } #ifdef nodef /* #ifdef SHORT_PACKETS */ Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.124 retrieving revision 1.125 diff -u -d -r1.124 -r1.125 --- data.c 26 May 2009 02:18:17 -0000 1.124 +++ data.c 3 Jun 2009 02:42:55 -0000 1.125 @@ -761,6 +761,7 @@ int F_why_dead_2 = 0; int F_auto_weapons = 0; int F_sp_rank = 0; +int F_sp_ltd = 0; int F_terrain = 0; /* paradise */ int F_armies_shipcap = 0; /* paradise */ From modemhero at users.sourceforge.net Tue Jun 2 21:42:57 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 03 Jun 2009 02:42:57 +0000 Subject: [netrek-cvs] client/netrekxp/include ltd_stats.h, NONE, 1.1 data.h, 1.111, 1.112 packets.h, 1.23, 1.24 proto.h, 1.67, 1.68 Message-ID: Update of /cvsroot/netrek/client/netrekxp/include In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14506/include Modified Files: data.h packets.h proto.h Added Files: ltd_stats.h Log Message: Add support for SP_LTD, still buggy. Added include/ltd_stats.h to source. Some minor formatting and fprintf fixes. Change unknown ranks to blank. --- NEW FILE: ltd_stats.h --- /* * * Dave Ahn * * Leonard/Tom/Dave (LTD) Extended statistics. For detailed info, read * the README.LTD file. * * For inline optimization details, read the README.LTD and * ltd_stats.c files. * * struct ltd_stats is a per-ship statistics group for each player. * This means that the player DB will increase by several factors in * size at the benefit of detailed stats that can be used to analyze * individual play for clued games. * */ #ifndef __INCLUDED_ltd_stats_h__ #define __INCLUDED_ltd_stats_h__ #include "defs.h" /* We need defines from this file */ #define LTD_VERSION 'a' /* version for SP_LTD packet */ typedef enum { LTD_TZONE_0 = 0, /* Zone 0 = backfield */ LTD_TZONE_1 = 1, /* Zone 1 = core + 2 open side */ LTD_TZONE_2 = 2, /* Zone 2 = front line */ LTD_TZONE_3 = 3, /* Zone 3 = enemy front line */ LTD_TZONE_4 = 4, /* Zone 4 = enemy core + 2 open side */ LTD_TZONE_5 = 5, /* Zone 5 = enemy backfield */ LTD_TZONE_6 = 6, /* Zone 6 = 3rd space */ LTD_TZONE_7 = 7, /* Zone 7 = unknown/diag */ LTD_NUM_TZONES = 8 /* number of zones */ } LTD_TZONE_T; /* XXNOTE: find a better way to do the inlining */ #ifdef LTD_INLINE #define __LTD_INLINE inline static #else #define __LTD_INLINE #endif /* for extende stats, one struct for each ship except GA and AT, which share the same slot */ typedef enum { LTD_TOTAL = 0, LTD_SC = 1, LTD_DD = 2, LTD_CA = 3, LTD_BB = 4, LTD_AS = 5, LTD_SB = 6, LTD_GA = 7, LTD_AT = 7, LTD_NUM_SHIPS = 8 } LTD_SHIP_T; #ifdef LTD_PER_RACE typedef enum { LTD_FED = 0, LTD_ROM = 1, LTD_KLI = 2, LTD_ORI = 3, LTD_NOBODY = 4, LTD_NUM_RACES = 5 } LTD_RACE_T; #else typedef enum { LTD_FED = 0, LTD_ROM = 0, LTD_KLI = 0, LTD_ORI = 0, LTD_NOBODY = 0, LTD_NUM_RACES = 1 } LTD_RACE_T; #endif /* LTD_PER_RACE */ /* LTD stats structure */ struct ltd_stats { /* How many times have I killed in this ship */ struct _kills { unsigned int total; /* total number of kills ever */ double max; /* max kills ever achieved */ unsigned int first; /* number of first kills made */ unsigned int first_potential; /* first kills that could be converted to carries */ unsigned int first_converted; /* first kills that actually were converted to carries */ unsigned int second; /* number of second kills made */ unsigned int second_potential; /* second kills that could be converted to carries */ unsigned int second_converted; /* second kills that actually were converted to carries */ unsigned int phasered; /* number of kills made with a phaser death blow */ unsigned int torped; /* number of kills made with a torp blow */ unsigned int plasmaed; /* number of kills made with a plamsa */ #if defined(_64BIT) && defined(linux) } __attribute__((packed)) kills; #else } kills; #endif /* How many times have I died in this ship */ struct _deaths { unsigned int total; /* total number of deaths ever */ unsigned int potential; /* number of times died as a potential carrier */ unsigned int converted; /* number of times died as a a converted carrier */ unsigned int dooshed; /* number of times died while ++ */ unsigned int phasered; /* number of times died from phaser */ unsigned int torped; /* number of times died from torp */ unsigned int plasmaed; /* number of times died from plasma */ unsigned int acc; /* number of times you died, and someone picked up armies with the kill */ } deaths; /* How many planets have I destroyed or taken */ struct _planets { unsigned int taken; /* number of planets taken */ unsigned int destroyed; /* number of planets destroyed */ } planets; /* How many enemy armies have you bombed */ struct _bomb { unsigned int planets; /* number of planets bombed */ unsigned int planets_8; /* number of planets with <= 8 armies bombed */ unsigned int planets_core; /* number of core planets bombed */ unsigned int armies; /* total number of armies bombed */ unsigned int armies_8; /* armies bombed where the planet being bombed had <= 8 armies */ unsigned int armies_core; /* armies bombed in a core planet */ } bomb; /* How many enemy carriers have you killed and armies ogged */ struct _ogged { unsigned int armies; /* number of enemy armies ogged */ unsigned int dooshed; /* number of dooshed real carriers */ unsigned int converted; /* number of converted enemy carriers */ unsigned int potential; /* number of potential enemy carriers */ unsigned int bigger_ship; /* number of times a real carrier was in a bigger ship */ unsigned int same_ship; /* number of times a real carrier was in the same sized ship */ unsigned int smaller_ship; /* number of times a real carrier was in the same sized ship */ unsigned int sb_armies; /* number of armies on enemy SB ogged */ unsigned int friendly; /* number of friendly carriers you killed */ unsigned int friendly_armies; /* number of friendly armies you killed due to blatant stupidity */ } ogged; /* How many friendly armies have you carried */ struct _armies { unsigned int total; /* number of friendly armies carried */ unsigned int attack; /* armies droped on enemy planets */ unsigned int reinforce; /* armies used to reinforce friendly planet < 4 */ unsigned int ferries; /* armies ferried to friendly planet >= 4 or SB */ unsigned int killed; /* armies killed */ } armies; /* How many carries have you made */ struct _carries { unsigned int total; /* number of carries you attempted */ unsigned int partial; /* number of times you delivered at least 1 army before dying ++ */ unsigned int completed; /* number of times you completed your carry by delivering all the armies */ unsigned int attack; /* number of times you dropped on a neutral or enemy planet */ unsigned int reinforce; /* number of times you reinforced a friendly planet < 4 */ unsigned int ferries; /* number of times you ferried to a friendly planet >= 4 or SB */ } carries; /* How much time we spent in relevant roles, modes or space */ struct _ticks { unsigned int total; /* total = green + yellow + red */ /* unsigned int green; */ /* time spent in green alert */ unsigned int yellow; /* time spent in yellow alert */ unsigned int red; /* time spent in red alert */ unsigned int zone[LTD_NUM_TZONES]; /* time spent in a particular zone */ unsigned int potential; /* time spent as potential carrier */ unsigned int carrier; /* time spent as carrier */ unsigned int repair; /* time spent in repair mode */ } ticks; unsigned int damage_repaired; /* total damage repaired */ /* Weapon stats */ struct _weapons { /* phasers */ struct _phaser { unsigned int fired; /* number of times the weapon was fired */ unsigned int hit; /* number of times the weapon hit */ struct _damage { unsigned int inflicted; /* damage inflicted with this weapon */ unsigned int taken; /* damage taken from this weapon */ } damage; } phaser; /* torps */ struct _torp { unsigned int fired; /* number of torps that were fired */ unsigned int hit; /* number of torps hit */ unsigned int detted; /* number of torps that were detted by enemy */ unsigned int selfdetted; /* number of torps self detted */ unsigned int wall; /* number of torps that hit the wall */ struct _damage damage; /* damage inflicted/taken */ } torps; /* plasma */ struct _plasma { unsigned int fired; /* number of plasmas that were fired */ unsigned int hit; /* number that hit */ unsigned int phasered; /* number that were phasered */ unsigned int wall; /* number that hit the wall */ struct _damage damage; /* damage inflicted/taken */ } plasma; /* damage repaired */ } weapons; #if defined(_64BIT) && defined(linux) } __attribute__((packed)); #else }; #endif /* LTD history structure - this is needed to calculate the LTD stats every tick. */ enum { LTD_NUM_HIST = 5 /* keep track of up to 5 events */ }; struct ltd_history { /* kill history */ struct _kill { unsigned int tick; /* tick kill was acquired */ char potential; /* kill was retained long enough to become potential or converted carrier */ struct player *victim; /* the player that was killed */ float before; /* kills i had before this one, perhaps from bombing, etc */ int ship; /* ship type of the victim */ } kills[LTD_NUM_HIST]; int num_kills; /* number of last_kills */ char kill_potential; /* i am a potential carrier 0 = no 1 = potential 1st kill 2 = potential 2nd kill 3 = converted 1st kill 4 = converted 2nd kill */ /* bombing history */ unsigned int last_bombed_tick;/* tick i bombed the last planet */ short last_bombed_planet; /* last planet that i bombed */ /* army/carries history */ short last_beamup_planet; short last_beamdown_planet; /* last planet i beamed up/down armies from value is planet number -1 = SB -2 = no planet */ int enemy_team; /* the enemy team, for ltd_zone */ }; /* forward declarations of structs for function prototypes */ struct player; struct stats; struct planet; /* function prototypes for non-inlined functions */ void ltd_reset(struct player *); void ltd_reset_struct(struct ltd_stats (*) [LTD_NUM_SHIPS]); void ltd_reset_hist(struct player *); int ltd_can_rank(struct player *); void ltd_update_totals(struct player *); /* function prototypes for inlined functions */ __LTD_INLINE float ltd_total_rating(struct player *); __LTD_INLINE float ltd_bombing_rating(struct player *); __LTD_INLINE float ltd_planet_rating(struct player *); __LTD_INLINE float ltd_defense_rating(struct player *); __LTD_INLINE float ltd_offense_rating(struct player *); __LTD_INLINE int ltd_kills(struct player *, const LTD_SHIP_T); __LTD_INLINE int ltd_deaths(struct player *, const LTD_SHIP_T); __LTD_INLINE int ltd_armies_bombed(struct player *, const LTD_SHIP_T); __LTD_INLINE int ltd_planets_taken(struct player *, const LTD_SHIP_T); __LTD_INLINE int ltd_ticks(struct player *, const LTD_SHIP_T); __LTD_INLINE int ltd_kills_max(struct player *, const LTD_SHIP_T); __LTD_INLINE void ltd_update_ticks(struct player *); __LTD_INLINE void ltd_update_kills(struct player *credit_killer, struct player *actual_killer, struct player *victim); __LTD_INLINE void ltd_update_kills_max(struct player *); __LTD_INLINE void ltd_update_deaths(struct player *victim, struct player *actual_killer); __LTD_INLINE void ltd_update_bomb(struct player *bomber, struct planet *planet_bombed, int armies_bombed); __LTD_INLINE void ltd_update_planets(struct player *taker, struct planet *planet); __LTD_INLINE void ltd_update_armies(struct player *carrier, struct planet *planet); __LTD_INLINE void ltd_update_armies_carried(struct player *carrier, struct player *sb); __LTD_INLINE void ltd_update_armies_ferried(struct player *carrier, struct player *sb); __LTD_INLINE void ltd_update_repaired(struct player *, const int damage); __LTD_INLINE void ltd_update_phaser_fired(struct player *shooter); __LTD_INLINE void ltd_update_phaser_hit(struct player *shooter); __LTD_INLINE void ltd_update_phaser_damage(struct player *shooter, struct player *victim, const int damage); __LTD_INLINE void ltd_update_torp_fired(struct player *shooter); __LTD_INLINE void ltd_update_torp_hit(struct player *shooter); __LTD_INLINE void ltd_update_torp_detted(struct player *shooter); __LTD_INLINE void ltd_update_torp_selfdetted(struct player *shooter); __LTD_INLINE void ltd_update_torp_wall(struct player *shooter); __LTD_INLINE void ltd_update_torp_damage(struct player *shooter, struct player *victim, const int damage); __LTD_INLINE void ltd_update_plasma_fired(struct player *shooter); __LTD_INLINE void ltd_update_plasma_hit(struct player *shooter); __LTD_INLINE void ltd_update_plasma_phasered(struct player *shooter); __LTD_INLINE void ltd_update_plasma_wall(struct player *shooter); __LTD_INLINE void ltd_update_plasma_damage(struct player *shooter, struct player *victim, const int damage); /* find a better way to do this inline stuff */ #ifdef LTD_INLINE /* this stuff is ugly */ #define __LTD_INCLUDE_SOURCE #include "ltd_stats.c" #undef __LTD_INCLUDE_SOURCE #endif #ifdef LTD_PER_RACE static inline LTD_RACE_T ltd_race(const short team) { switch(team) { case FED: return LTD_FED; case ROM: return LTD_ROM; case KLI: return LTD_KLI; case ORI: return LTD_ORI; default: return LTD_NOBODY; } } #else #define ltd_race(XXX) 0 #endif /* LTD_PER_RACE */ #endif /* __INCLUDED_ltd_stats_h__ */ Index: packets.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/packets.h,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- packets.h 28 May 2009 01:19:16 -0000 1.23 +++ packets.h 3 Jun 2009 02:42:55 -0000 1.24 @@ -3,6 +3,7 @@ * * Kevin P. Smith 1/29/89 */ #include "copyright2.h" +#include "ltd_stats.h" #define STATUS_TOKEN "\t@@@" /* ATM */ @@ -132,6 +133,7 @@ #define SP_S_KILLS 58 /* # of kills player have */ #define SP_S_STATS 59 /* see SP_STATS */ #define SP_RANK 61 /* rank data */ +#define SP_LTD 62 /* LTD stats for character */ /* variable length packets */ #define VPLAYER_SIZE 4 @@ -866,6 +868,15 @@ char cname[8]; /* short 'curt' rank name */ }; +struct ltd_spacket +{ + char type; + char version; + char endian; + char pad; + struct ltd_stats ltd; +}; + struct ship_cap_spacket { /* Server configuration of * client */ Index: data.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v retrieving revision 1.111 retrieving revision 1.112 diff -u -d -r1.111 -r1.112 --- data.h 26 May 2009 02:18:17 -0000 1.111 +++ data.h 3 Jun 2009 02:42:55 -0000 1.112 @@ -662,6 +662,7 @@ extern int F_why_dead_2; extern int F_auto_weapons; extern int F_sp_rank; +extern int F_sp_ltd; extern int F_terrain; /* paradise */ extern int F_armies_shipcap; /* paradise */ Index: proto.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/proto.h,v retrieving revision 1.67 retrieving revision 1.68 diff -u -d -r1.67 -r1.68 --- proto.h 26 May 2009 02:18:17 -0000 1.67 +++ proto.h 3 Jun 2009 02:42:55 -0000 1.68 @@ -1134,6 +1134,7 @@ struct flags_all_spacket; void handleFlagsAll (struct flags_all_spacket *packet); void handleRank (struct rank_spacket *packet); +void handleLtd (struct ltd_spacket *packet); void initialize_players (void); void initialize_plasmas (void); void initialize_torps (void); From modemhero at users.sourceforge.net Tue Jun 2 22:28:01 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 03 Jun 2009 03:28:01 +0000 Subject: [netrek-cvs] client/netrekxp/include ltd_stats.h,1.1,1.2 Message-ID: Update of /cvsroot/netrek/client/netrekxp/include In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19226/include Modified Files: ltd_stats.h Log Message: Use pragma packing to make ltd work better. Ltd needs portability as struct size still differs from linux. Index: ltd_stats.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/ltd_stats.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ltd_stats.h 3 Jun 2009 02:42:55 -0000 1.1 +++ ltd_stats.h 3 Jun 2009 03:27:59 -0000 1.2 @@ -95,6 +95,7 @@ /* LTD stats structure */ +#pragma pack(push,1) struct ltd_stats { /* How many times have I killed in this ship */ @@ -119,11 +120,7 @@ torp blow */ unsigned int plasmaed; /* number of kills made with a plamsa */ -#if defined(_64BIT) && defined(linux) - } __attribute__((packed)) kills; -#else } kills; -#endif /* How many times have I died in this ship */ @@ -305,12 +302,8 @@ /* damage repaired */ } weapons; - -#if defined(_64BIT) && defined(linux) -} __attribute__((packed)); -#else }; -#endif +#pragma pack(pop) /* LTD history structure - this is needed to calculate the LTD stats every tick. */ From modemhero at users.sourceforge.net Tue Jun 2 22:28:01 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 03 Jun 2009 03:28:01 +0000 Subject: [netrek-cvs] client/netrekxp/src socket.c,1.67,1.68 Message-ID: Update of /cvsroot/netrek/client/netrekxp/src In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19226/src Modified Files: socket.c Log Message: Use pragma packing to make ltd work better. Ltd needs portability as struct size still differs from linux. Index: socket.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/socket.c,v retrieving revision 1.67 retrieving revision 1.68 diff -u -d -r1.67 -r1.68 --- socket.c 3 Jun 2009 02:42:55 -0000 1.67 +++ socket.c 3 Jun 2009 03:27:59 -0000 1.68 @@ -2863,6 +2863,7 @@ ltd = &packet->ltd; LineToConsole("SP_LTD test output begins\n"); + LineToConsole("SP_LTD: ltd_stats size is %d\n", sizeof(struct ltd_stats)); dump_prefix("kt", "kills total"); dump_stat(kills.total); dump_prefix("kmax", "kills max"); dump_max(kills.max); dump_prefix("k1", "kills first"); dump_stat(kills.first); From modemhero at users.sourceforge.net Wed Jun 3 21:02:31 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Thu, 04 Jun 2009 02:02:31 +0000 Subject: [netrek-cvs] client/netrekxp/src socket.c,1.68,1.69 Message-ID: Update of /cvsroot/netrek/client/netrekxp/src In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11815/src Modified Files: socket.c Log Message: SP_LTD, update to latest packet protocol. Index: socket.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/socket.c,v retrieving revision 1.68 retrieving revision 1.69 diff -u -d -r1.68 -r1.69 --- socket.c 3 Jun 2009 03:27:59 -0000 1.68 +++ socket.c 4 Jun 2009 02:02:29 -0000 1.69 @@ -26,6 +26,7 @@ #include "struct.h" #include "data.h" #include "packets.h" +#include "ltd_stats.h" #include "wtext.h" #include "playerlist.h" #include "map.h" @@ -2846,24 +2847,102 @@ } #define dump_stat(STAT) { \ - LineToConsole(" %8u\n", (unsigned int) ltd->STAT); \ + LineToConsole(" %8u\n", (unsigned int) ltd.STAT); \ } #define dump_max(STAT) { \ - LineToConsole(" %8u\n", (unsigned int) ltd->STAT); \ + LineToConsole(" %8u\n", (unsigned int) ltd.STAT); \ } void handleLtd (struct ltd_spacket *packet) { - struct ltd_stats *ltd; + struct ltd_stats ltd; + if (packet->version != LTD_VERSION) return; - if (packet->endian != 'l') return; - ltd = &packet->ltd; + ltd.kills.total = ntohl(packet->kt); + ltd.kills.max = (double)(ntohl(packet->kmax)) / 100.0; + ltd.kills.first = ntohl(packet->k1); + ltd.kills.first_potential = ntohl(packet->k1p); + ltd.kills.first_converted = ntohl(packet->k1c); + ltd.kills.second = ntohl(packet->k2); + ltd.kills.second_potential = ntohl(packet->k2p); + ltd.kills.second_converted = ntohl(packet->k2c); + ltd.kills.phasered = ntohl(packet->kbp); + ltd.kills.torped = ntohl(packet->kbt); + ltd.kills.plasmaed = ntohl(packet->kbs); + ltd.deaths.total = ntohl(packet->dt); + ltd.deaths.potential = ntohl(packet->dpc); + ltd.deaths.converted = ntohl(packet->dcc); + ltd.deaths.dooshed = ntohl(packet->ddc); + ltd.deaths.phasered = ntohl(packet->dbp); + ltd.deaths.torped = ntohl(packet->dbt); + ltd.deaths.plasmaed = ntohl(packet->dbs); + ltd.deaths.acc = ntohl(packet->acc); + ltd.planets.taken = ntohl(packet->ptt); + ltd.planets.destroyed = ntohl(packet->pdt); + ltd.bomb.planets = ntohl(packet->bpt); + ltd.bomb.planets_8 = ntohl(packet->bp8); + ltd.bomb.planets_core = ntohl(packet->bpc); + ltd.bomb.armies = ntohl(packet->bat); + ltd.bomb.armies_8 = ntohl(packet->ba8); + ltd.bomb.armies_core = ntohl(packet->bac); + ltd.ogged.armies = ntohl(packet->oat); + ltd.ogged.dooshed = ntohl(packet->odc); + ltd.ogged.converted = ntohl(packet->occ); + ltd.ogged.potential = ntohl(packet->opc); + ltd.ogged.bigger_ship = ntohl(packet->ogc); + ltd.ogged.same_ship = ntohl(packet->oec); + ltd.ogged.smaller_ship = ntohl(packet->olc); + ltd.ogged.sb_armies = ntohl(packet->osba); + ltd.ogged.friendly = ntohl(packet->ofc); + ltd.ogged.friendly_armies = ntohl(packet->ofa); + ltd.armies.total = ntohl(packet->at); + ltd.armies.attack = ntohl(packet->aa); + ltd.armies.reinforce = ntohl(packet->ar); + ltd.armies.ferries = ntohl(packet->af); + ltd.armies.killed = ntohl(packet->ak); + ltd.carries.total = ntohl(packet->ct); + ltd.carries.partial = ntohl(packet->cp); + ltd.carries.completed = ntohl(packet->cc); + ltd.carries.attack = ntohl(packet->ca); + ltd.carries.reinforce = ntohl(packet->cr); + ltd.carries.ferries = ntohl(packet->cf); + ltd.ticks.total = ntohl(packet->tt); + ltd.ticks.yellow = ntohl(packet->tyel); + ltd.ticks.red = ntohl(packet->tred); + ltd.ticks.zone[0] = ntohl(packet->tz0); + ltd.ticks.zone[1] = ntohl(packet->tz1); + ltd.ticks.zone[2] = ntohl(packet->tz2); + ltd.ticks.zone[3] = ntohl(packet->tz3); + ltd.ticks.zone[4] = ntohl(packet->tz4); + ltd.ticks.zone[5] = ntohl(packet->tz5); + ltd.ticks.zone[6] = ntohl(packet->tz6); + ltd.ticks.zone[7] = ntohl(packet->tz7); + ltd.ticks.potential = ntohl(packet->tpc); + ltd.ticks.carrier = ntohl(packet->tcc); + ltd.ticks.repair = ntohl(packet->tr); + ltd.damage_repaired = ntohl(packet->dr); + ltd.weapons.phaser.fired = ntohl(packet->wpf); + ltd.weapons.phaser.hit = ntohl(packet->wph); + ltd.weapons.phaser.damage.inflicted = ntohl(packet->wpdi); + ltd.weapons.phaser.damage.taken = ntohl(packet->wpdt); + ltd.weapons.torps.fired = ntohl(packet->wtf); + ltd.weapons.torps.hit = ntohl(packet->wth); + ltd.weapons.torps.detted = ntohl(packet->wtd); + ltd.weapons.torps.selfdetted = ntohl(packet->wts); + ltd.weapons.torps.wall = ntohl(packet->wtw); + ltd.weapons.torps.damage.inflicted = ntohl(packet->wtdi); + ltd.weapons.torps.damage.taken = ntohl(packet->wtdt); + ltd.weapons.plasma.fired = ntohl(packet->wsf); + ltd.weapons.plasma.hit = ntohl(packet->wsh); + ltd.weapons.plasma.phasered = ntohl(packet->wsp); + ltd.weapons.plasma.wall = ntohl(packet->wsw); + ltd.weapons.plasma.damage.inflicted = ntohl(packet->wsdi); + ltd.weapons.plasma.damage.taken = ntohl(packet->wsdt); LineToConsole("SP_LTD test output begins\n"); - LineToConsole("SP_LTD: ltd_stats size is %d\n", sizeof(struct ltd_stats)); dump_prefix("kt", "kills total"); dump_stat(kills.total); dump_prefix("kmax", "kills max"); dump_max(kills.max); dump_prefix("k1", "kills first"); dump_stat(kills.first); @@ -5429,29 +5508,171 @@ break; case SP_LTD : LineToConsole("\nS->C SP_LTD\t"); - if (log_packets > 1) + if (log_packets > 2) { - LineToConsole(" version='%c', endian='%c', pad='%c',\n", - ((struct ltd_spacket *) packet)->version, - ((struct ltd_spacket *) packet)->endian, - ((struct ltd_spacket *) packet)->pad ); - switch (((struct ltd_spacket *) packet)->version) - { - case LTD_VERSION: - { - struct ltd_stats *ltd = &(((struct ltd_spacket *)packet)->ltd); - unsigned char *ptr = (unsigned char *) ltd; - int i; - - for (i = 0; i < sizeof(struct ltd_stats); i++) - { - if (i%20 == 0) - LineToConsole("\n"); - LineToConsole(" %02x ", ptr[i]); - } - } - LineToConsole("\n"); - } + struct ltd_spacket *lp = (struct ltd_spacket *) packet; + LineToConsole("version='%c', " + "kt=%d, " + "kmax=%d/100, " + "k1=%d, " + "k1p=%d, " + "k1c=%d, " + "k2=%d, " + "k2p=%d, " + "k2c=%d, " + "kbp=%d, " + "kbt=%d, " + "kbs=%d, " + "dt=%d, " + "dpc=%d, " + "dcc=%d, " + "ddc=%d, " + "dbp=%d, " + "dbt=%d, " + "dbs=%d, " + "acc=%d, " + "ptt=%d, " + "pdt=%d, " + "bpt=%d, " + "bp8=%d, " + "bpc=%d, " + "bat=%d, " + "ba8=%d, " + "bac=%d, " + "oat=%d, " + "odc=%d, " + "occ=%d, " + "opc=%d, " + "ogc=%d, " + "oec=%d, " + "olc=%d, " + "osba=%d, " + "ofc=%d, " + "ofa=%d, " + "at=%d, " + "aa=%d, " + "ar=%d, " + "af=%d, " + "ak=%d, " + "ct=%d, " + "cp=%d, " + "cc=%d, " + "ca=%d, " + "cr=%d, " + "cf=%d, " + "tt=%d, " + "tyel=%d, " + "tred=%d, " + "tz0=%d, " + "tz1=%d, " + "tz2=%d, " + "tz3=%d, " + "tz4=%d, " + "tz5=%d, " + "tz6=%d, " + "tz7=%d, " + "tpc=%d, " + "tcc=%d, " + "tr=%d, " + "dr=%d, " + "wpf=%d, " + "wph=%d, " + "wpdi=%d, " + "wpdt=%d, " + "wtf=%d, " + "wth=%d, " + "wtd=%d, " + "wts=%d, " + "wtw=%d, " + "wtdi=%d, " + "wtdt=%d, " + "wsf=%d, " + "wsh=%d, " + "wsp=%d, " + "wsw=%d, " + "wsdi=%d, " + "wsdt=%d, \n", + lp->version, + ntohl(lp->kt), + ntohl(lp->kmax), + ntohl(lp->k1), + ntohl(lp->k1p), + ntohl(lp->k1c), + ntohl(lp->k2), + ntohl(lp->k2p), + ntohl(lp->k2c), + ntohl(lp->kbp), + ntohl(lp->kbt), + ntohl(lp->kbs), + ntohl(lp->dt), + ntohl(lp->dpc), + ntohl(lp->dcc), + ntohl(lp->ddc), + ntohl(lp->dbp), + ntohl(lp->dbt), + ntohl(lp->dbs), + ntohl(lp->acc), + ntohl(lp->ptt), + ntohl(lp->pdt), + ntohl(lp->bpt), + ntohl(lp->bp8), + ntohl(lp->bpc), + ntohl(lp->bat), + ntohl(lp->ba8), + ntohl(lp->bac), + ntohl(lp->oat), + ntohl(lp->odc), + ntohl(lp->occ), + ntohl(lp->opc), + ntohl(lp->ogc), + ntohl(lp->oec), + ntohl(lp->olc), + ntohl(lp->osba), + ntohl(lp->ofc), + ntohl(lp->ofa), + ntohl(lp->at), + ntohl(lp->aa), + ntohl(lp->ar), + ntohl(lp->af), + ntohl(lp->ak), + ntohl(lp->ct), + ntohl(lp->cp), + ntohl(lp->cc), + ntohl(lp->ca), + ntohl(lp->cr), + ntohl(lp->cf), + ntohl(lp->tt), + ntohl(lp->tyel), + ntohl(lp->tred), + ntohl(lp->tz0), + ntohl(lp->tz1), + ntohl(lp->tz2), + ntohl(lp->tz3), + ntohl(lp->tz4), + ntohl(lp->tz5), + ntohl(lp->tz6), + ntohl(lp->tz7), + ntohl(lp->tpc), + ntohl(lp->tcc), + ntohl(lp->tr), + ntohl(lp->dr), + ntohl(lp->wpf), + ntohl(lp->wph), + ntohl(lp->wpdi), + ntohl(lp->wpdt), + ntohl(lp->wtf), + ntohl(lp->wth), + ntohl(lp->wtd), + ntohl(lp->wts), + ntohl(lp->wtw), + ntohl(lp->wtdi), + ntohl(lp->wtdt), + ntohl(lp->wsf), + ntohl(lp->wsh), + ntohl(lp->wsp), + ntohl(lp->wsw), + ntohl(lp->wsdi), + ntohl(lp->wsdt) ); } break; #ifdef SHORT_PACKETS From modemhero at users.sourceforge.net Wed Jun 3 21:02:31 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Thu, 04 Jun 2009 02:02:31 +0000 Subject: [netrek-cvs] client/netrekxp/include ltd_stats.h, 1.2, 1.3 packets.h, 1.24, 1.25 Message-ID: Update of /cvsroot/netrek/client/netrekxp/include In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11815/include Modified Files: ltd_stats.h packets.h Log Message: SP_LTD, update to latest packet protocol. Index: ltd_stats.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/ltd_stats.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ltd_stats.h 3 Jun 2009 03:27:59 -0000 1.2 +++ ltd_stats.h 4 Jun 2009 02:02:29 -0000 1.3 @@ -20,8 +20,6 @@ #include "defs.h" /* We need defines from this file */ -#define LTD_VERSION 'a' /* version for SP_LTD packet */ - typedef enum { LTD_TZONE_0 = 0, /* Zone 0 = backfield */ @@ -95,7 +93,6 @@ /* LTD stats structure */ -#pragma pack(push,1) struct ltd_stats { /* How many times have I killed in this ship */ @@ -303,7 +300,6 @@ } weapons; }; -#pragma pack(pop) /* LTD history structure - this is needed to calculate the LTD stats every tick. */ Index: packets.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/packets.h,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- packets.h 3 Jun 2009 02:42:55 -0000 1.24 +++ packets.h 4 Jun 2009 02:02:29 -0000 1.25 @@ -3,7 +3,6 @@ * * Kevin P. Smith 1/29/89 */ #include "copyright2.h" -#include "ltd_stats.h" #define STATUS_TOKEN "\t@@@" /* ATM */ @@ -868,14 +867,98 @@ char cname[8]; /* short 'curt' rank name */ }; +#define LTD_VERSION 'a' /* version for SP_LTD packet */ + +#pragma pack(push,1) /* Necessary to remove padding during compile, + size of struct needs to be exact, GCC equivalent + is __attribute__ (( packed )) */ struct ltd_spacket { char type; char version; - char endian; - char pad; - struct ltd_stats ltd; + char pad[2]; + unsigned int kt; /* kills total, kills.total */ + unsigned int kmax; /* kills max, kills.max */ + unsigned int k1; /* kills first, kills.first */ + unsigned int k1p; /* kills first potential, kills.first_potential */ + unsigned int k1c; /* kills first converted, kills.first_converted */ + unsigned int k2; /* kills second, kills.second */ + unsigned int k2p; /* kills second potential, kills.second_potential */ + unsigned int k2c; /* kills second converted, kills.second_converted */ + unsigned int kbp; /* kills by phaser, kills.phasered */ + unsigned int kbt; /* kills by torp, kills.torped */ + unsigned int kbs; /* kills by smack, kills.plasmaed */ + unsigned int dt; /* deaths total, deaths.total */ + unsigned int dpc; /* deaths as potential carrier, deaths.potential */ + unsigned int dcc; /* deaths as converted carrier, deaths.converted */ + unsigned int ddc; /* deaths as dooshed carrier, deaths.dooshed */ + unsigned int dbp; /* deaths by phaser, deaths.phasered */ + unsigned int dbt; /* deaths by torp, deaths.torped */ + unsigned int dbs; /* deaths by smack, deaths.plasmaed */ + unsigned int acc; /* actual carriers created, deaths.acc */ + unsigned int ptt; /* planets taken total, planets.taken */ + unsigned int pdt; /* planets destroyed total, planets.destroyed */ + unsigned int bpt; /* bombed planets total, bomb.planets */ + unsigned int bp8; /* bombed planets <=8, bomb.planets_8 */ + unsigned int bpc; /* bombed planets core, bomb.planets_core */ + unsigned int bat; /* bombed armies total, bomb.armies */ + unsigned int ba8; /* bombed_armies <= 8, bomb.armies_8 */ + unsigned int bac; /* bombed armies core, bomb.armies_core */ + unsigned int oat; /* ogged armies total, ogged.armies */ + unsigned int odc; /* ogged dooshed carrier, ogged.dooshed */ + unsigned int occ; /* ogged converted carrier, ogged.converted */ + unsigned int opc; /* ogged potential carrier, ogged.potential */ + unsigned int ogc; /* ogged bigger carrier, ogged.bigger_ship */ + unsigned int oec; /* ogged same carrier, ogged.same_ship */ + unsigned int olc; /* ogger smaller carrier, ogged.smaller_ship */ + unsigned int osba; /* ogged sb armies, ogged.sb_armies */ + unsigned int ofc; /* ogged friendly carrier, ogged.friendly */ + unsigned int ofa; /* ogged friendly armies, ogged.friendly_armies */ + unsigned int at; /* armies carried total, armies.total */ + unsigned int aa; /* armies used to attack, armies.attack */ + unsigned int ar; /* armies used to reinforce, armies.reinforce */ + unsigned int af; /* armies ferried, armies.ferries */ + unsigned int ak; /* armies killed, armies.killed */ + unsigned int ct; /* carries total, carries.total */ + unsigned int cp; /* carries partial, carries.partial */ + unsigned int cc; /* carries completed, carries.completed */ + unsigned int ca; /* carries to attack, carries.attack */ + unsigned int cr; /* carries to reinforce, carries.reinforce */ + unsigned int cf; /* carries to ferry, carries.ferries */ + unsigned int tt; /* ticks total, ticks.total */ + unsigned int tyel; /* ticks in yellow, ticks.yellow */ + unsigned int tred; /* ticks in red, ticks.red */ + unsigned int tz0; /* ticks in zone 0, ticks.zone[0] */ + unsigned int tz1; /* ticks in zone 1, ticks.zone[1] */ + unsigned int tz2; /* ticks in zone 2, ticks.zone[2] */ + unsigned int tz3; /* ticks in zone 3, ticks.zone[3] */ + unsigned int tz4; /* ticks in zone 4, ticks.zone[4] */ + unsigned int tz5; /* ticks in zone 5, ticks.zone[5] */ + unsigned int tz6; /* ticks in zone 6, ticks.zone[6] */ + unsigned int tz7; /* ticks in zone 7, ticks.zone[7] */ + unsigned int tpc; /* ticks as potential carrier, ticks.potential */ + unsigned int tcc; /* ticks as carrier++, ticks.carrier */ + unsigned int tr; /* ticks in repair, ticks.repair */ + unsigned int dr; /* damage repaired, damage_repaired */ + unsigned int wpf; /* weap phaser fired, weapons.phaser.fired */ + unsigned int wph; /* weap phaser hit, weapons.phaser.hit */ + unsigned int wpdi; /* weap phaser damage inflicted, weapons.phaser.damage.inflicted */ + unsigned int wpdt; /* weap phaser damage taken, weapons.phaser.damage.taken */ + unsigned int wtf; /* weap torp fired, weapons.torps.fired */ + unsigned int wth; /* weap torp hit, weapons.torps.hit */ + unsigned int wtd; /* weap torp detted, weapons.torps.detted */ + unsigned int wts; /* weap torp self detted, weapons.torps.selfdetted */ + unsigned int wtw; /* weap torp hit wall, weapons.torps.wall */ + unsigned int wtdi; /* weap torp damage inflicted, weapons.torps.damage.inflicted */ + unsigned int wtdt; /* weap torp damage taken, weapons.torps.damage.taken */ + unsigned int wsf; /* weap smack fired, weapons.plasma.fired */ + unsigned int wsh; /* weap smack hit, weapons.plasma.hit */ + unsigned int wsp; /* weap smack phasered, weapons.plasma.phasered */ + unsigned int wsw; /* weap smack hit wall, weapons.plasma.wall */ + unsigned int wsdi; /* weap smack damage inflicted, weapons.plasma.damage.inflicted */ + unsigned int wsdt; /* weap smack damage taken, weapons.plasma.damage.taken */ }; +#pragma pack(pop) /* Restores packing values saved by push */ struct ship_cap_spacket { /* Server configuration of From modemhero at users.sourceforge.net Fri Jun 5 22:29:10 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 06 Jun 2009 03:29:10 +0000 Subject: [netrek-cvs] client/netrekxp/include data.h, 1.112, 1.113 version.h, 1.9, 1.10 Message-ID: Update of /cvsroot/netrek/client/netrekxp/include In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21097/include Modified Files: data.h version.h Log Message: Add improved reporting on fragmented packet (from COW). Change name/version to Netrek XP 2010 v1.0. Add metaBroncoOnly netrekrc option to only list bronco servers on the metaserver, Index: data.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v retrieving revision 1.112 retrieving revision 1.113 diff -u -d -r1.112 -r1.113 --- data.h 3 Jun 2009 02:42:55 -0000 1.112 +++ data.h 6 Jun 2009 03:29:08 -0000 1.113 @@ -725,6 +725,7 @@ extern int forceMono; extern int metaType; extern int metaStatusLevel; +extern int metaBroncoOnly; extern int mungScrollbarColors; extern int showMotd; Index: version.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/version.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- version.h 15 Mar 2009 12:31:26 -0000 1.9 +++ version.h 6 Jun 2009 03:29:08 -0000 1.10 @@ -2,5 +2,5 @@ /* store the version info here */ -static char mvers[] = "1.1"; -static char version[] = "Netrek XP 2009"; \ No newline at end of file +static char mvers[] = "1.0"; +static char version[] = "Netrek XP 2010"; \ No newline at end of file From modemhero at users.sourceforge.net Fri Jun 5 22:29:11 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 06 Jun 2009 03:29:11 +0000 Subject: [netrek-cvs] client/netrekxp/src bccnetrek.rc, 1.10, 1.11 defaults.c, 1.99, 1.100 getname.c, 1.12, 1.13 netrek.rc, 1.8, 1.9 parsemeta.c, 1.49, 1.50 socket.c, 1.69, 1.70 vccnetrek.rc, 1.8, 1.9 Message-ID: Update of /cvsroot/netrek/client/netrekxp/src In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21097/src Modified Files: bccnetrek.rc defaults.c getname.c netrek.rc parsemeta.c socket.c vccnetrek.rc Log Message: Add improved reporting on fragmented packet (from COW). Change name/version to Netrek XP 2010 v1.0. Add metaBroncoOnly netrekrc option to only list bronco servers on the metaserver, Index: bccnetrek.rc =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/bccnetrek.rc,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- bccnetrek.rc 15 Mar 2009 12:31:26 -0000 1.10 +++ bccnetrek.rc 6 Jun 2009 03:29:08 -0000 1.11 @@ -1,20 +1,20 @@ #include "resource.h" 1 VERSIONINFO -FILEVERSION 1, 1, 0, 0 -PRODUCTVERSION 1, 1, 0, 0 +FILEVERSION 1, 0, 0, 0 +PRODUCTVERSION 1, 0, 0, 0 FILEOS VOS_DOS_WINDOWS32 FILETYPE VFT_APP { BLOCK "StringFileInfo" { BLOCK "040904E4" { VALUE "CompanyName", "Netrek\000" - VALUE "FileDescription", "Netrek XP 2009 Client\000" + VALUE "FileDescription", "Netrek XP 2010 Client\000" VALUE "FileVersion", "123456789012345678901234567890\000" - VALUE "InternalName", "Netrek XP 2009\000" + VALUE "InternalName", "Netrek XP 2010\000" VALUE "LegalCopyright", "Copyright ? 1986-2009\000" VALUE "OriginalFilename", "netrek.rc\000" - VALUE "ProductName", "Netrek XP 2009 Client\000" + VALUE "ProductName", "Netrek XP 2010 Client\000" VALUE "ProductVersion", "123456789012345678901234567890\000" } } Index: vccnetrek.rc =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/vccnetrek.rc,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- vccnetrek.rc 15 Mar 2009 12:31:26 -0000 1.8 +++ vccnetrek.rc 6 Jun 2009 03:29:08 -0000 1.9 @@ -3,18 +3,18 @@ MAIN ICON DISCARDABLE "main.ico" 1 VERSIONINFO -FILEVERSION 1, 1, 0, 0 -PRODUCTVERSION 1, 1, 0, 0 +FILEVERSION 1, 0, 0, 0 +PRODUCTVERSION 1, 0, 0, 0 { BLOCK "StringFileInfo" { BLOCK "040904E4" { VALUE "CompanyName", "Netrek\000" - VALUE "FileDescription", "Netrek XP 2009 Client\000" + VALUE "FileDescription", "Netrek XP 2010 Client\000" VALUE "FileVersion", "123456789012345678901234567890\000" - VALUE "InternalName", "Netrek XP 2009\000" + VALUE "InternalName", "Netrek XP 2010\000" VALUE "LegalCopyright", "Copyright ? 1986-2009\000" VALUE "OriginalFilename", "vccnetrek.rc\000" - VALUE "ProductName", "Netrek XP 2009 Client\000" + VALUE "ProductName", "Netrek XP 2010 Client\000" VALUE "ProductVersion", "123456789012345678901234567890\000" } } Index: getname.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/getname.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- getname.c 19 Apr 2008 16:22:59 -0000 1.12 +++ getname.c 6 Jun 2009 03:29:08 -0000 1.13 @@ -75,7 +75,7 @@ static char *README[] = { "", - "Netrek XP 2009 - the better netrek eXPerience!", + "Netrek XP 2010 - the better netrek eXPerience!", "", "", "", Index: netrek.rc =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/netrek.rc,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- netrek.rc 15 Mar 2009 12:31:26 -0000 1.8 +++ netrek.rc 6 Jun 2009 03:29:08 -0000 1.9 @@ -28,8 +28,8 @@ // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,1,0,0 - PRODUCTVERSION 1,1,0,0 + FILEVERSION 1,0,0,0 + PRODUCTVERSION 1,0,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x3L @@ -46,15 +46,15 @@ BEGIN VALUE "Comments", "\0" VALUE "CompanyName", "Netrek\0" - VALUE "FileDescription", "Netrek XP 2009 Client\0" - VALUE "FileVersion", "1, 3, 0, 0\0" - VALUE "InternalName", "Netrek XP 2009\0" + VALUE "FileDescription", "Netrek XP 2010 Client\0" + VALUE "FileVersion", "1, 0, 0, 0\0" + VALUE "InternalName", "Netrek XP 2010\0" VALUE "LegalCopyright", "Copyright ? 1986-2009\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "netrek.rc\0" VALUE "PrivateBuild", "\0" - VALUE "ProductName", "Netrek XP 2009 Client\0" - VALUE "ProductVersion", "1, 3, 0, 0\0" + VALUE "ProductName", "Netrek XP 2010 Client\0" + VALUE "ProductVersion", "1, 0, 0, 0\0" VALUE "SpecialBuild", "\0" END END Index: parsemeta.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/parsemeta.c,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- parsemeta.c 21 May 2009 00:15:03 -0000 1.49 +++ parsemeta.c 6 Jun 2009 03:29:08 -0000 1.50 @@ -145,7 +145,7 @@ }; int metaStatusLevel = statusNobody; - +int metaBroncoOnly = 0; /* Functions */ extern void terminate (int error); @@ -447,7 +447,7 @@ token = strtok(NULL,","); } /* while (token != NULL) */ - metaWindowName = "Netrek XP 2009 Server List"; + metaWindowName = "Netrek XP 2010 Server List"; return sent; } @@ -572,8 +572,8 @@ throwaway++; - /* ignore paradise servers */ - // if (type == 'P') throwaway++; + /* Ignore non-Bronco servers? INL server counts as Bronco... */ + if (metaBroncoOnly && type != 'B' && type != 'I') throwaway++; /* if it's to be thrown away, do not add this server, skip to next */ if (throwaway) continue; @@ -1175,7 +1175,7 @@ } free (sockbuf); - metaWindowName = "Netrek XP 2009 Server List"; + metaWindowName = "Netrek XP 2010 Server List"; return 1; } @@ -1299,6 +1299,9 @@ /* whether to report everything that happens */ metaVerbose = booleanDefault("metaVerbose", metaVerbose); + /* whether to list only Bronco servers */ + metaBroncoOnly = booleanDefault("metaBroncoOnly", metaBroncoOnly); + /* status cutoff for listing servers */ metaStatusLevel = intDefault ("metaStatusLevel", metaStatusLevel); Index: socket.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/socket.c,v retrieving revision 1.69 retrieving revision 1.70 diff -u -d -r1.69 -r1.70 --- socket.c 4 Jun 2009 02:02:29 -0000 1.69 +++ socket.c 6 Jun 2009 03:29:08 -0000 1.70 @@ -1122,21 +1122,20 @@ if (*bufptr < 1 || *bufptr > NUM_PACKETS || handlers[*bufptr].size == 0) { -#ifndef CORRUPTED_PACKETS int i; -#endif - LineToConsole ("Unknown packet type: %d\n", *bufptr); - -#ifndef CORRUPTED_PACKETS - LineToConsole ("count: %d, bufptr at %d, Content:\n", count, - bufptr - buf); + LineToConsole ("netrek protocol stream alignment failure, " + "next byte %d (0x%02x)\n", *bufptr, *bufptr); + LineToConsole ("protocol buffer dump, bytes %d, [bufptr] at %d :\n", + count, bufptr - buf); for (i = 0; i < count; i++) { - LineToConsole ("0x%x, ", (unsigned int) buf[i]); + if (i == (bufptr - buf)) + LineToConsole ("[%02x]", (unsigned int) buf[i] & 0xff); + else + LineToConsole (" %02x ", (unsigned int) buf[i] & 0xff); } -#endif - + LineToConsole("\n"); return (0); } size = handlers[*bufptr].size; Index: defaults.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v retrieving revision 1.99 retrieving revision 1.100 diff -u -d -r1.99 -r1.100 --- defaults.c 23 May 2009 13:23:39 -0000 1.99 +++ defaults.c 6 Jun 2009 03:29:08 -0000 1.100 @@ -314,6 +314,12 @@ }, #endif #ifdef META + {"metaBroncoOnly", &metaBroncoOnly, RC_BOOL, + { + "Only list Bronco/INL servers on the metaserver", + NULL + } + }, {"metaPort", &metaPort, RC_INT, { "Metaserver port", @@ -1713,7 +1719,7 @@ char *pek; if (strlen (pigcall) == 0) - sprintf (pigcall, "Netrek XP 2009 (%s) - the smarter netrek eXPerience!", mvers); + sprintf (pigcall, "Netrek XP 2010 (%s) - the smarter netrek eXPerience!", mvers); timerType = intDefault ("timerType", timerType); if (timerType < T_NONE || timerType >= T_TOTAL) From modemhero at users.sourceforge.net Fri Jun 5 22:29:22 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 06 Jun 2009 03:29:22 +0000 Subject: [netrek-cvs] client/netrekxp/resources/netrekrc netrekrc.txt, 1.14, 1.15 Message-ID: Update of /cvsroot/netrek/client/netrekxp/resources/netrekrc In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21150/netrekrc Modified Files: netrekrc.txt Log Message: Add improved reporting on fragmented packet (from COW). Change name/version to Netrek XP 2010 v1.0. Add metaBroncoOnly netrekrc option to only list bronco servers on the metaserver, Index: netrekrc.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/netrekrc/netrekrc.txt,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- netrekrc.txt 23 May 2009 13:23:50 -0000 1.14 +++ netrekrc.txt 6 Jun 2009 03:29:20 -0000 1.15 @@ -188,6 +188,9 @@ # if cursor is in the message windows messageKeyOnly: on +# Only list Bronco/INL servers on the metaserver +metaBroncoOnly: off + # Metaserver port metaPort: 3521 From modemhero at users.sourceforge.net Fri Jun 5 22:29:22 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 06 Jun 2009 03:29:22 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.218, 1.219 netrekrc_options.txt, 1.61, 1.62 Message-ID: Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21150/docs Modified Files: changes.txt netrekrc_options.txt Log Message: Add improved reporting on fragmented packet (from COW). Change name/version to Netrek XP 2010 v1.0. Add metaBroncoOnly netrekrc option to only list bronco servers on the metaserver, Index: netrekrc_options.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc_options.txt,v retrieving revision 1.61 retrieving revision 1.62 diff -u -d -r1.61 -r1.62 --- netrekrc_options.txt 23 May 2009 13:23:50 -0000 1.61 +++ netrekrc_options.txt 6 Jun 2009 03:29:20 -0000 1.62 @@ -103,7 +103,7 @@ messageKeyOnly: (on/off) only start messages with the actual message key(s), if cursor is in the message windows -messageKeyOnly: 1 +metaBroncoOnly: (on/off) only list Bronco/INL servers metaCache: (path) path to metacache file metaPing: (on/off) show ping stats to all servers in metaserver window metaPort: (port) metaserver port Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.218 retrieving revision 1.219 diff -u -d -r1.218 -r1.219 --- changes.txt 26 May 2009 02:18:23 -0000 1.218 +++ changes.txt 6 Jun 2009 03:29:20 -0000 1.219 @@ -1,4 +1,4 @@ -Netrek XP 2009, Version 1.1: +Netrek XP 2010, Version 1.0: General bug fixes: 1) Many paradise bugs fixed. @@ -27,6 +27,10 @@ have more or less ranks than normal. Practical application - grand admiral rank on sturgeon now displays correctly in player list and rank window. And rank window now properly displays offense requirements for rank. +7) Added support for server feature packet SP_LTD. This allows detailed stats +to be sent to the client. +8) Added netrekrc option "metaBroncoOnly" to only list Bronco/INL servers in +the list of servers provided by the aggregate metaservers. Netrek XP 2009, Version 1.0: (Released July-2008) From modemhero at users.sourceforge.net Fri Jun 5 22:29:28 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 06 Jun 2009 03:29:28 +0000 Subject: [netrek-cvs] client/netrekxp/resources/htmlhelp/html generalconfig.html, 1.62, 1.63 Message-ID: Update of /cvsroot/netrek/client/netrekxp/resources/htmlhelp/html In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21180 Modified Files: generalconfig.html Log Message: Add improved reporting on fragmented packet (from COW). Change name/version to Netrek XP 2010 v1.0. Add metaBroncoOnly netrekrc option to only list bronco servers on the metaserver, Index: generalconfig.html =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/htmlhelp/html/generalconfig.html,v retrieving revision 1.62 retrieving revision 1.63 diff -u -d -r1.62 -r1.63 --- generalconfig.html 23 May 2009 13:23:57 -0000 1.62 +++ generalconfig.html 6 Jun 2009 03:29:26 -0000 1.63 @@ -588,6 +588,16 @@ filename +metaBroncoOnly +Only list Bronco/INL servers on the metaserver + +
    +
  • on
  • +
  • off (default)
  • +
+ + + metaPort Port of Metaserver integer
default: 3521 From modemhero at users.sourceforge.net Fri Jun 5 22:44:23 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 06 Jun 2009 03:44:23 +0000 Subject: [netrek-cvs] client/netrekxp/src parsemeta.c,1.50,1.51 Message-ID: Update of /cvsroot/netrek/client/netrekxp/src In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23517 Modified Files: parsemeta.c Log Message: Identify client as bronco only to metaservers. Index: parsemeta.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/parsemeta.c,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- parsemeta.c 6 Jun 2009 03:29:08 -0000 1.50 +++ parsemeta.c 6 Jun 2009 03:44:21 -0000 1.51 @@ -373,7 +373,7 @@ return 0; } req = (char *) malloc(80); - sprintf(req, "?version=%s %s", version, mvers); + sprintf(req, "?version=%s %s %s", version, mvers, (metaBroncoOnly ? "Bronco" : "")); reqlen = strlen(req); } From quozl at users.sourceforge.net Mon Jun 8 01:22:44 2009 From: quozl at users.sourceforge.net (James Cameron) Date: Mon, 08 Jun 2009 06:22:44 +0000 Subject: [netrek-cvs] client/netrekxp/include version.h,1.10,1.11 Message-ID: Update of /cvsroot/netrek/client/netrekxp/include In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14397 Modified Files: version.h Log Message: add newline missing at end of file Index: version.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/version.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- version.h 6 Jun 2009 03:29:08 -0000 1.10 +++ version.h 8 Jun 2009 06:22:41 -0000 1.11 @@ -3,4 +3,4 @@ /* store the version info here */ static char mvers[] = "1.0"; -static char version[] = "Netrek XP 2010"; \ No newline at end of file +static char version[] = "Netrek XP 2010"; From modemhero at users.sourceforge.net Mon Jun 8 17:26:09 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 08 Jun 2009 22:26:09 +0000 Subject: [netrek-cvs] client/netrekxp/include data.h, 1.113, 1.114 packets.h, 1.25, 1.26 proto.h, 1.68, 1.69 Message-ID: Update of /cvsroot/netrek/client/netrekxp/include In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv4835/include Modified Files: data.h packets.h proto.h Log Message: Remove unnecessary defines (SERVER and all SERVER related defines, COW, RCD, PING, FEATURE_PACKETS). Discovered a nasty crash bug with RCDs/RCMs and %S on paradise servers, fixed. Index: data.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v retrieving revision 1.113 retrieving revision 1.114 diff -u -d -r1.113 -r1.114 --- data.h 6 Jun 2009 03:29:08 -0000 1.113 +++ data.h 8 Jun 2009 22:26:07 -0000 1.114 @@ -433,7 +433,6 @@ /* jn - SMARTMACRO */ extern char lastMessage[]; extern int MacroNum; -extern char *classes[]; extern char teamlet[]; extern char *teamshort[]; extern char pseudo[PSEUDOSIZE]; @@ -637,11 +636,8 @@ #endif -#ifdef FEATURE_PACKETS extern int F_feature_packets; -#endif - extern int F_cloak_maxwarp; extern int F_self_8flags; extern int F_self_8flags2; Index: packets.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/packets.h,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- packets.h 4 Jun 2009 02:02:29 -0000 1.25 +++ packets.h 8 Jun 2009 22:26:07 -0000 1.26 @@ -104,9 +104,7 @@ * packet */ #endif -#ifdef PING #define SP_PING 46 /* ping packet */ -#endif #ifdef SHORT_PACKETS #define SP_S_TORP 47 /* variable length torp @@ -203,10 +201,8 @@ #define CP_S_DUMMY 47 #endif -#ifdef FEATURE_PACKETS #define CP_FEATURE 60 #define SP_FEATURE 60 -#endif /* special paradise type tells us when to update the display on playback. Not sent or received, only placed in the recorder file */ @@ -842,7 +838,6 @@ char name[16]; }; -#ifdef FEATURE_PACKETS struct feature_cpacket { char type; @@ -852,8 +847,6 @@ char name[80]; }; -#endif - struct rank_spacket { char type; /* SP_RANK */ Index: proto.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/proto.h,v retrieving revision 1.68 retrieving revision 1.69 diff -u -d -r1.68 -r1.69 --- proto.h 3 Jun 2009 02:42:55 -0000 1.68 +++ proto.h 8 Jun 2009 22:26:07 -0000 1.69 @@ -180,7 +180,6 @@ /******************************************************************************/ /*** feature.c ***/ /******************************************************************************/ -#ifdef FEATURE_PACKETS void sendFeature (char *name, char feature_type, int value, @@ -188,7 +187,6 @@ char arg2); struct feature_cpacket; void handleFeature (struct feature_cpacket *packet); -#endif /******************************************************************************/ /*** findslot.c ***/ From modemhero at users.sourceforge.net Mon Jun 8 17:26:09 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 08 Jun 2009 22:26:09 +0000 Subject: [netrek-cvs] client/netrekxp/win32 config.h,1.22,1.23 Message-ID: Update of /cvsroot/netrek/client/netrekxp/win32 In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv4835/win32 Modified Files: config.h Log Message: Remove unnecessary defines (SERVER and all SERVER related defines, COW, RCD, PING, FEATURE_PACKETS). Discovered a nasty crash bug with RCDs/RCMs and %S on paradise servers, fixed. Index: config.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/win32/config.h,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- config.h 9 May 2009 21:21:44 -0000 1.22 +++ config.h 8 Jun 2009 22:26:07 -0000 1.23 @@ -5,22 +5,13 @@ #ifndef __CONFIG_H #define __CONFIG_H -/* -################################################################################ - Type of code (select in configure.in) -################################################################################ -*/ - -#define COW -#undef SERVER - /* ################################################################################ Compilation specific defines ################################################################################ */ -#define CBUGS "Send bugs/suggestions to: billbalcerski at hotmail.com" +#define CBUGS "Send bugs/suggestions to: billbalcerski at gmail.com" /* ################################################################################ @@ -39,26 +30,14 @@ Common defines ------------------------------------------------------------ */ - -/* RCD - Support Reciever variable distresses */ -#define RCD - -/* PING - Ping statistics */ -#define PING - /* SHORT_PACKETS - Reduce Network load */ #define SHORT_PACKETS - -/* FEATURE_PACKETS - feature packets */ -#define FEATURE_PACKETS - /* ------------------------------------------------------------ - COW only defines + Client defines ------------------------------------------------------------ */ -#ifdef COW /* THREADED - Multi-threaded input handling */ #define THREADED @@ -148,163 +127,6 @@ /* We want reverse-playback!!! */ #define REVERSE_PLAYBACK -#endif /* COW */ - - -/* - ------------------------------------------------------------ - SERVER only defines - ------------------------------------------------------------ -*/ -#ifdef SERVER - -/* AUTOMOTD - Updates your MOTD every 12 hours */ -#undef AUTOMOTD - -/* CHAIN_REACTION - Don't give credit for chain reactions */ -#define CHAIN_REACTION - -/* CHECKMESG - Check for god messages and/or log all messages */ -#define CHECKMESG - -/* ERIKPLAGUE - Define for Erik's Plagueing */ -#define ERIKPLAGUE - -/* FEATURES - Server/client communication */ -#define FEATURES - -/* FULL_HOSTNAMES - Show entire player location (domain) */ -#define FULL_HOSTNAMES - -/* INL_RESOURCES - Use INL resources */ -#define INL_RESOURCES - -/* INL_POP - Use INL style planet popping scheme */ -#define INL_POP - -/* NO_PLANET_PLAGUE - Define for plagueing (Don't use with ERIKPLAGUE) */ -#undef NO_PLANET_PLAGUE - -/* NO_UNWARRING_BOMBING - No 3rd space bombing */ -#define NO_UNWARRING_BOMBING - -/* RESETGALAXY - Reset the galaxy after each conquer */ -#define RESETGALAXY - -/* RESTRICT_BOMB - No bombing out of t-mode */ -#define RESTRICT_BOMB - -/* SELF_RESET - Galaxy will reset if the daemon dies */ -#define SELF_RESET - -/* SHORT_THRESHOLD - For Short Packets */ -#define SHORT_THRESHOLD - -/* SURRENDER_SHORT - Cut surrender time in half */ -#undef SURRENDER_SHORT - -/* TWO_RACE - Conquer only a 1/4 of the galaxy for reset */ -#define TWO_RACE - -/* SENDFLAGS - Print flags set in MOTD */ -#undef SENDFLAGS - -/* CHECK_ENV - Check environment variable NTSERV_PATH for location of system files */ -#undef CHECK_ENV - -/* GPPRINT - Print which path is being used to find the system files */ -#undef GPPRINT - -/* ONCHECK - support for trekon player check */ -#define ONCHECK - -/* NBR - Leave in for server. It tells programs like xsg that it is this code. */ -#define NBR - -/* DS - Daemon Sychronization - Tedd Hadley */ -#define DS - - -/* NEED_EXIT - For systems that need exit defined */ -#define NEED_EXIT - -/* NEWMASK - New tournament selection code. Less rigid than older code. */ -#define NEWMASK - -/* SB_TRANSWARP - starbase transwarp */ -#define SB_TRANSWARP - -/* FLAT_BONUS - 3x bonus for killing last army on a planet */ -#undef FLAT_BONUS - -/* BASEPRACTICE - trainingserver support */ -#define BASEPRACTICE - -/* NEW_CREDIT - give 1 planet for destroying, two planets for taking */ -#undef NEW_CREDIT - -/* FASTER_SB_MAXUPDATES - allow 10 ups/sec for SB's */ -#define FASTER_SB_MAXUPDATES - -/* SBFUEL_FIX - fix starbase re-fueling */ -#define SBFUEL_FIX - -/* NEW_ETEMP - Wreck's etemp fix */ -#undef NEW_ETEMP - -/* DOGFIGHT - .sysdef interface for dogfight robot */ -#define DOGFIGHT - -/* OBSERVERS - allow players to watch */ -#define OBSERVERS - -/* VOTING - allow voting mode */ -#define VOTING - -/* ALLOW_EJECT - define to allow players to eject others */ -#ifdef VOTING -#undef ALLOW_EJECT -#endif - -/* NO_BRUTALITY - disallow fighting between waiting players in the dogfighting mode */ -#ifdef DOGFIGHT -#define NO_BRUTALITY -#endif - -/* AS_CLOAK - gives cloaked AS's more randomness in their apparent positions */ -#undef AS_CLOAK - -/* GENO_COUNT - keep track of a player's winning genocides */ -#undef GENO_COUNT - -#ifdef VOTING -/* AUTO_INL - starts up INL robot by majority vote */ -#define AUTO_INL - -/* AUTO_PRACTICE - starts up PRACTICE robot by majority vote */ -#ifdef BASEPRACTICE -#define AUTO_PRACTICE -#endif - -/* AUTO_HOCKEY - starts up HOCKEY robot by majority vote */ -#define AUTO_HOCKEY - -/* AUTO_DOGFIGHT - starts up DOGFIGHT robot by majority vote */ -#ifdef DOGFIGHT -#define AUTO_DOGFIGHT -#endif - -/* TRIPLE_PLANET_MAYHEM - enable voting for the three planet cool server idea by felix at coop.com */ -#define TRIPLE_PLANET_MAYHEM -#endif - -/* MESSAGES_ALL_TIME - allow messaging during freezes like twarp, refit, and war decl. */ -#undef MESSAGES_ALL_TIME - - -#endif /* SERVER */ - - /* ############################################################################## All system dependencies should be defined here From modemhero at users.sourceforge.net Mon Jun 8 17:26:09 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 08 Jun 2009 22:26:09 +0000 Subject: [netrek-cvs] client/netrekxp/src beeplite.c, 1.17, 1.18 cowmain.c, 1.40, 1.41 data.c, 1.125, 1.126 distress.c, 1.6, 1.7 feature.c, 1.32, 1.33 socket.c, 1.70, 1.71 Message-ID: Update of /cvsroot/netrek/client/netrekxp/src In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv4835/src Modified Files: beeplite.c cowmain.c data.c distress.c feature.c socket.c Log Message: Remove unnecessary defines (SERVER and all SERVER related defines, COW, RCD, PING, FEATURE_PACKETS). Discovered a nasty crash bug with RCDs/RCMs and %S on paradise servers, fixed. Index: cowmain.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/cowmain.c,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- cowmain.c 25 May 2009 14:43:53 -0000 1.40 +++ cowmain.c 8 Jun 2009 22:26:07 -0000 1.41 @@ -847,9 +847,7 @@ else connectToServer (xtrekPort); -#ifdef FEATURE_PACKETS sendFeature ("FEATURE_PACKETS", 'S', 1, 0, 0); -#endif /* TIMER */ timeStart = time(NULL); Index: distress.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/distress.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- distress.c 8 Apr 2007 22:36:41 -0000 1.6 +++ distress.c 8 Jun 2009 22:26:07 -0000 1.7 @@ -493,11 +493,7 @@ mtext = &message[ADDRLEN]; -#ifndef SERVER MZERO ((char *) dist, sizeof (dist)); -#else - bzero ((char *) dist, sizeof (dist)); -#endif dist->sender = from; dist->distype = (unsigned char) (mtext[0] & 0x1f); @@ -618,14 +614,10 @@ struct player *j; struct planet *l; char *strcap (char *s); - -#ifndef SERVER extern int ping_tloss_sc; /* total % loss 0--100, server to client */ extern int ping_tloss_cs; /* total % loss 0--100, client to server */ extern int ping_av; /* average rt */ extern int ping_sd; /* standard deviation */ - -#endif char c; @@ -766,7 +758,6 @@ *pbuf1++ = sender->p_mapchars[1]; break; case 'W': /* push WTEMP flag into buf */ - #ifdef RCM if (dist->distype == rcm) /* whydead for RCM */ { @@ -774,7 +765,6 @@ } else #endif - if (dist->wtmpflag) *pbuf1++ = '1'; else @@ -805,17 +795,12 @@ else { #endif - sprintf (tmp, "%5.2f\0", j->p_kills); - APPEND (pbuf1, tmp); - #ifdef RCM } #endif - break; - case 'U': /* push player name into buf */ cap = 1; case 'u': /* push player name into buf */ @@ -830,45 +815,25 @@ cap = 0; break; case 'S': /* push ship type into buf */ - -#ifndef SERVER - APPEND (pbuf1, classes[sender->p_ship.s_type]); -#else - APPEND (pbuf1, shiptypes[sender->p_ship.s_type]); -#endif - - break; - -#ifdef SERVER - case 'v': /* push average ping round trip time into buf */ - case 'V': /* push ping stdev into buf */ - case 'y': /* push packet loss into buf */ - *pbuf1++ = '0'; - case 'M': /* push capitalized lastMessage into buf */ - case 'm': /* push lastMessage into buf */ + sprintf (tmp, "%c%c", sender->p_ship.s_desig[0], sender->p_ship.s_desig[1]); + APPEND (pbuf1, tmp); break; -#else case 'M': /* push capitalized lastMessage into buf */ cap = 1; case 'm': /* push lastMessage into buf */ APPEND_CAP (pbuf1, cap, lastMessage); cap = 0; break; - case 'v': /* push average ping round trip time into buf */ APPEND_INT (pbuf1, ping_av); break; - case 'V': /* push ping stdev into buf */ APPEND_INT (pbuf1, ping_sd); break; - case 'y': /* push packet loss into buf */ /* this is the weighting formula used be socket.c ntserv */ APPEND_INT (pbuf1, (2 * ping_tloss_sc + ping_tloss_cs) / 3); break; -#endif - case '*': /* push %* into buf */ case '}': /* push %} into buf */ case '{': /* push %{ into buf */ Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.125 retrieving revision 1.126 diff -u -d -r1.125 -r1.126 --- data.c 3 Jun 2009 02:42:55 -0000 1.125 +++ data.c 8 Jun 2009 22:26:07 -0000 1.126 @@ -440,7 +440,6 @@ #endif /* NEWMACRO */ char lastMessage[80]; -char *classes[] = { "SC", "DD", "CA", "BB", "AS", "SB", "GA", "AT" }; char teamlet[] = { 'I', 'F', 'R', 'X', 'K', 'X', 'X', 'X', 'O', 'X', 'X', 'X', 'X', 'X', 'X', 'A' }; @@ -736,11 +735,8 @@ #endif -#ifdef FEATURE_PACKETS int F_feature_packets = 0; -#endif - int F_cloak_maxwarp = 0; int F_self_8flags = 0; int F_self_8flags2 = 0; Index: feature.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/feature.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- feature.c 3 Jun 2009 02:42:55 -0000 1.32 +++ feature.c 8 Jun 2009 22:26:07 -0000 1.33 @@ -21,8 +21,6 @@ /* type is CP_FEATURE, which is 60. feature_spacket is identical. */ #include "config.h" -#ifdef FEATURE_PACKETS - #include #include @@ -360,4 +358,3 @@ checkFeature (packet); } -#endif /* FEATURE_PACKETS */ Index: beeplite.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/beeplite.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- beeplite.c 16 Apr 2008 00:08:05 -0000 1.17 +++ beeplite.c 8 Jun 2009 22:26:07 -0000 1.18 @@ -10,10 +10,7 @@ #include #include #include - -#ifndef SERVER #include "Wlib.h" -#endif #include "defs.h" #include "struct.h" Index: socket.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/socket.c,v retrieving revision 1.70 retrieving revision 1.71 diff -u -d -r1.70 -r1.71 --- socket.c 6 Jun 2009 03:29:08 -0000 1.70 +++ socket.c 8 Jun 2009 22:26:07 -0000 1.71 @@ -195,9 +195,7 @@ {0, dummy}, /* 59 */ #endif -#ifdef FEATURE_PACKETS {sizeof (struct feature_cpacket), handleFeature}, /* CP_FEATURE; 60 */ -#endif {sizeof (struct rank_spacket), handleRank}, /* SP_RANK */ {sizeof (struct ltd_spacket), handleLtd}, /* SP_LTD */ }; @@ -245,12 +243,7 @@ 0, /* 39 */ 0, /* 40 */ 0, /* 41 */ - -#ifdef PING sizeof (struct ping_cpacket), /* CP_PING_RESPONSE */ -#else - 0, -#endif #ifdef SHORT_PACKETS sizeof (struct shortreq_cpacket), /* CP_S_REQ */ @@ -276,11 +269,7 @@ 0, /* 57 */ 0, /* 58 */ 0, /* 59 */ - -#ifdef FEATURE_PACKETS sizeof (struct feature_cpacket), /* CP_FEATURE; 60 */ -#endif - }; #define NUM_PACKETS (sizeof(handlers) / sizeof(handlers[0]) - 1) @@ -5468,7 +5457,6 @@ ntohl(((struct player_s_spacket *) packet)->y) ); break; #endif -#ifdef PING case SP_PING : /* ping packet */ LineToConsole("\nS->C SP_PING\t"); if (log_packets > 1) @@ -5480,8 +5468,6 @@ ((struct ping_spacket *) packet)->iloss_sc, ((struct ping_spacket *) packet)->iloss_cs ); break; -#endif -#ifdef FEATURE_PACKETS case SP_FEATURE : LineToConsole("\nS->C SP_FEATURE\t"); if (log_packets > 1) @@ -5492,7 +5478,6 @@ ntohl(((struct feature_cpacket *) packet)->value), ((struct feature_cpacket *) packet)->name ); break; -#endif case SP_RANK : LineToConsole("\nS->C SP_RANK\t"); if (log_packets > 1) @@ -6088,7 +6073,6 @@ LineToConsole(" no struct defined,"); break; #endif -#ifdef FEATURE_PACKETS case CP_FEATURE : LineToConsole("\nC->S CP_FEATURE\t"); if (log_packets > 1) @@ -6099,7 +6083,6 @@ ntohl(((struct feature_cpacket *) packet)->value), ((struct feature_cpacket *) packet)->name ); break; -#endif default : LineToConsole("\nC->S UNKNOWN\t"); if(log_packets > 1) From modemhero at users.sourceforge.net Mon Jun 8 17:55:05 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 08 Jun 2009 22:55:05 +0000 Subject: [netrek-cvs] client/netrekxp/include data.h, 1.114, 1.115 defs.h, 1.37, 1.38 packets.h, 1.26, 1.27 Message-ID: Update of /cvsroot/netrek/client/netrekxp/include In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv7322/include Modified Files: data.h defs.h packets.h Log Message: Remove SHORT_PACKETS define Index: defs.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/defs.h,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- defs.h 25 May 2009 14:43:53 -0000 1.37 +++ defs.h 8 Jun 2009 22:55:03 -0000 1.38 @@ -395,7 +395,6 @@ #define NETSTAT_DF_NFT_S "2000" -#ifdef SHORT_PACKETS #define SPK_VOFF 0 /* variable packets off */ #define SPK_VON 1 /* variable packets on */ #define SPK_MOFF 2 /* message packets off */ @@ -417,7 +416,6 @@ #define SPK_WFIELD 3 #define SPK_TFIELD 4 #define SPK_DONE 5 -#endif #ifndef NBT #define NBT Index: data.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v retrieving revision 1.114 retrieving revision 1.115 diff -u -d -r1.114 -r1.115 --- data.h 8 Jun 2009 22:26:07 -0000 1.114 +++ data.h 8 Jun 2009 22:55:03 -0000 1.115 @@ -171,7 +171,6 @@ extern int colorfulPhasers; #endif -#ifdef SHORT_PACKETS extern int why_dead; extern int tryShort, tryShort1; extern int recv_short; @@ -184,7 +183,6 @@ /* S_P2 */ extern int shortversion; /* Which version do we use? */ -#endif extern int globalerr; extern int ingame; /* If player is in game - to distinguish between whether @@ -452,11 +450,8 @@ extern W_Window udpWin, phaserwin, hintWin; extern W_Window waitWin, waitqWin, countWin, motdButtonWin, motdWin; -#ifdef SHORT_PACKETS extern W_Window spWin; -#endif - #ifdef NBT extern W_Window macroWin; Index: packets.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/packets.h,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- packets.h 8 Jun 2009 22:26:07 -0000 1.26 +++ packets.h 8 Jun 2009 22:55:03 -0000 1.27 @@ -91,8 +91,6 @@ #define SP_THINGY 37 /* paradise - thingy location */ #define SP_THINGY_INFO 38 /* paradise - thingy status */ #define SP_SHIP_CAP 39 /* Handles server ship mods */ - -#ifdef SHORT_PACKETS #define SP_S_REPLY 40 /* reply to send-short * request */ #define SP_S_MESSAGE 41 /* var. Message Packet */ @@ -102,11 +100,7 @@ #define SP_S_YOU_SS 44 /* your ship status */ #define SP_S_PLAYER 45 /* variable length player * packet */ -#endif - #define SP_PING 46 /* ping packet */ - -#ifdef SHORT_PACKETS #define SP_S_TORP 47 /* variable length torp * packet */ #define SP_S_TORP_INFO 48 /* SP_S_TORP with TorpInfo */ @@ -136,7 +130,6 @@ #define VPLAYER_SIZE 4 #define SHORTVERSION 11 /* S_P2 */ #define OLDSHORTVERSION 10 /* Short packets version 1*/ -#endif /* packets sent from remote client to xtrek server */ @@ -193,13 +186,11 @@ #define CP_PING_RESPONSE 42 /* client response */ -#ifdef SHORT_PACKETS #define CP_S_REQ 43 #define CP_S_THRS 44 #define CP_S_MESSAGE 45 /* vari. Message Packet */ #define CP_S_RESERVED 46 #define CP_S_DUMMY 47 -#endif #define CP_FEATURE 60 #define SP_FEATURE 60 @@ -1051,7 +1042,6 @@ #define FLAGS_ALL_CLOAK_OFF_SHIELDS_UP 2 #define FLAGS_ALL_CLOAK_OFF_SHIELDS_DOWN 3 -#ifdef SHORT_PACKETS struct shortreq_cpacket { /* CP_S_REQ */ char type; @@ -1234,7 +1224,6 @@ unsigned int sbmaxkills; /* max kills as sb * 100 */ }; -#endif /* Shapes of thingys. It would be best to add to the end of this list and try to coordinate your additions with other hackers. */ From modemhero at users.sourceforge.net Mon Jun 8 17:55:06 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 08 Jun 2009 22:55:06 +0000 Subject: [netrek-cvs] client/netrekxp/src cowmain.c, 1.41, 1.42 data.c, 1.126, 1.127 defaults.c, 1.100, 1.101 defwin.c, 1.7, 1.8 helpwin.c, 1.15, 1.16 input.c, 1.53, 1.54 local.c, 1.118, 1.119 mswindow.c, 1.93, 1.94 newwin.c, 1.78, 1.79 option.c, 1.60, 1.61 short.c, 1.29, 1.30 socket.c, 1.71, 1.72 spopt.c, 1.3, 1.4 Message-ID: Update of /cvsroot/netrek/client/netrekxp/src In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv7322/src Modified Files: cowmain.c data.c defaults.c defwin.c helpwin.c input.c local.c mswindow.c newwin.c option.c short.c socket.c spopt.c Log Message: Remove SHORT_PACKETS define Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.93 retrieving revision 1.94 diff -u -d -r1.93 -r1.94 --- mswindow.c 28 Mar 2009 02:50:24 -0000 1.93 +++ mswindow.c 8 Jun 2009 22:55:03 -0000 1.94 @@ -5446,7 +5446,6 @@ } -#ifdef SHORT_PACKETS /* Apparently this solves some problem on X, but here it just forces a redraw...*/ /* Hrm - This was using redrawScrolling(win), updated to (win, hdc) -SAC 24 Jul 96 */ /* Was void W_SetSensitive(Window *window, int b) -SAC */ @@ -5466,7 +5465,6 @@ ReleaseDC (((Window *)win)->hwnd, hdc); } } -#endif // Uses SRCAND for raster operation - useful for masking void Index: spopt.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/spopt.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- spopt.c 1 Apr 2007 10:11:37 -0000 1.3 +++ spopt.c 8 Jun 2009 22:55:04 -0000 1.4 @@ -8,9 +8,6 @@ /******************************************************************************/ #include "config.h" - -#ifdef SHORT_PACKETS -/* */ #include "copyright.h" #include @@ -199,6 +196,3 @@ /* Unmap window */ W_UnmapWindow (spWin); } - - -#endif Index: newwin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/newwin.c,v retrieving revision 1.78 retrieving revision 1.79 diff -u -d -r1.78 -r1.79 --- newwin.c 25 May 2009 14:43:53 -0000 1.78 +++ newwin.c 8 Jun 2009 22:55:04 -0000 1.79 @@ -1126,11 +1126,9 @@ udpWin = W_MakeMenu ("UDP", TWINSIDE + 10, -BORDER + 10, 40, UDP_NUMOPTS, NULL, 2); W_SetWindowButtonHandler (udpWin, udpaction); -#ifdef SHORT_PACKETS spWin = W_MakeMenu ("network", TWINSIDE + 10, -BORDER + 10, 40, SPK_NUMFIELDS, NULL, 2); W_SetWindowKeyDownHandler (spWin, spaction); W_SetWindowButtonHandler (spWin, spaction); -#endif #if defined(SOUND) soundWin = W_MakeMenu("sound", TWINSIDE + 20, -BORDER + 10, 33, @@ -1198,10 +1196,7 @@ W_DefineTrekCursor (tstatw); W_DefineWarningCursor (qwin); W_DefineArrowCursor (udpWin); - -#ifdef SHORT_PACKETS W_DefineArrowCursor (spWin); -#endif /* SRS these are not defined? Oh, because it's a inline def... grrr*/ W_DefineFedCursor (teamWin[0]); @@ -1269,11 +1264,8 @@ W_MapWindow (reviewWin); if (checkMapped ("UDP")) udpwindow (); - -#ifdef SHORT_PACKETS if (checkMapped ("network")) spwindow (); -#endif if (checkMapped ("stats")) W_MapWindow (statwin); } Index: input.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/input.c,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- input.c 24 May 2009 01:38:55 -0000 1.53 +++ input.c 8 Jun 2009 22:55:03 -0000 1.54 @@ -2014,11 +2014,8 @@ torps[i + (me->p_no * ntorps)].t_status == TSTRAIGHT) { sendDetMineReq ((short) (i + (me->p_no * ntorps))); - -#ifdef SHORT_PACKETS if (recv_short) break; /* Let the server det for me */ -#endif } } } @@ -2278,9 +2275,7 @@ W_UnmapWindow (docwin); #endif -#ifdef SHORT_PACKETS W_UnmapWindow (spWin); -#endif W_UnmapWindow (pStats); W_UnmapWindow (statwin); @@ -2456,10 +2451,7 @@ void Key45 (void) { -#ifdef SHORT_PACKETS sendShortReq (SPK_SALL, 1); -#endif - } /******************************************************************************/ @@ -3113,14 +3105,10 @@ void Key96 (void) { - -#ifdef SHORT_PACKETS if (spWin != NULL && W_IsMapped (spWin)) spdone (); else spwindow (); -#endif - } /******************************************************************************/ @@ -3569,11 +3557,7 @@ void Key124 (void) { - -#ifdef SHORT_PACKETS sendShortReq (SPK_ALL, 1); -#endif - } /******************************************************************************/ Index: local.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v retrieving revision 1.118 retrieving revision 1.119 diff -u -d -r1.118 -r1.119 --- local.c 28 Mar 2009 09:35:38 -0000 1.118 +++ local.c 8 Jun 2009 22:55:03 -0000 1.119 @@ -1970,7 +1970,6 @@ if (tx == px && ty == py) continue; -#ifdef SHORT_PACKETS if (php->ph_status != PHMISS) /* KOC 10/20/95 */ { /* hack for SP_2 */ dir = (unsigned char) @@ -1978,7 +1977,6 @@ (double) (tx - px)) / XPI * 128.0); } else -#endif { dir = (unsigned char) (NORMALIZE (php->ph_dir + 64)); } @@ -3360,10 +3358,8 @@ { /* If alive but out of bounds, we probably missed a packet giving our location, so quietly request a new one */ -#ifdef SHORT_PACKETS if (me->p_status == PALIVE) sendShortReq (SPK_SALL, 0); -#endif return; } Index: cowmain.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/cowmain.c,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- cowmain.c 8 Jun 2009 22:26:07 -0000 1.41 +++ cowmain.c 8 Jun 2009 22:55:03 -0000 1.42 @@ -1037,8 +1037,7 @@ if (tryUdp && commMode != COMM_UDP) sendUdpReq (COMM_UDP); -#ifdef SHORT_PACKETS /* should we be checking for - * udp on here? */ + /* should we be checking for udp on here? */ if (tryShort) sendShortReq (SPK_VON, 1); else @@ -1050,10 +1049,6 @@ sendUdpReq (COMM_UPDATE); } -#else - /* `=' style update to get the kills in the playerlist right */ - sendUdpReq (COMM_UPDATE); -#endif /* Send request for updatesPerSec. New servers now support 50 u/s */ lastUpdateSpeed = updatesPerSec = intDefault ("updatesPerSec", updatesPerSec); sendUpdatePacket (1000000 / updatesPerSec); Index: short.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/short.c,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- short.c 15 Mar 2009 12:16:43 -0000 1.29 +++ short.c 8 Jun 2009 22:55:04 -0000 1.30 @@ -9,7 +9,6 @@ #include "config.h" -#ifdef SHORT_PACKETS #include #include #include @@ -2199,7 +2198,3 @@ PlistNoteUpdate (pnum); } /* for */ } - -#endif - -/* END SHORT_PACKETS */ Index: socket.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/socket.c,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- socket.c 8 Jun 2009 22:26:07 -0000 1.71 +++ socket.c 8 Jun 2009 22:55:04 -0000 1.72 @@ -67,7 +67,6 @@ { } -#ifdef SHORT_PACKETS char numofbits[256] = { 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, @@ -93,8 +92,6 @@ /* S_P2 */ int shortversion = SHORTVERSION; /* Which version do we use? */ -#endif /* SHORT_PACKETS */ - #ifdef PACKET_LOG void Log_Packet (char type, int act_size); @@ -144,8 +141,6 @@ {sizeof (struct thingy_info_spacket), handleThingyInfo}, /* SP_THINGY_INFO */ {sizeof (struct ship_cap_spacket), handleShipCap}, /* SP_SHIP_CAP */ - -#ifdef SHORT_PACKETS {sizeof (struct shortreply_spacket), handleShortReply}, /* SP_S_REPLY */ {-1, handleSMessage}, /* SP_S_MESSAGE */ {-1 /* sizeof(struct @@ -154,47 +149,21 @@ {sizeof (struct youshort_spacket), handleSelfShort}, /* SP_S_YOU */ {sizeof (struct youss_spacket), handleSelfShip}, /* SP_S_YOU_SS */ {-1, /* variable */ handleVPlayer}, /* SP_S_PLAYER */ -#else - {0, dummy}, /* 40 */ - {0, dummy}, /* 41 */ - {0, dummy}, /* 42 */ - {0, dummy}, /* 43 */ - {0, dummy}, /* 44 */ - {0, dummy}, /* 45 */ -#endif {sizeof (struct ping_spacket), handlePing}, /* SP_PING */ - -#ifdef SHORT_PACKETS {-1, /* variable */ handleVTorp}, /* SP_S_TORP */ {-1, handleVTorpInfo}, /* SP_S_TORP_INFO */ {20, handleVTorp}, /* SP_S_8_TORP */ {-1, handleVPlanet}, /* SP_S_PLANET */ -#else - {0, dummy}, /* 47 */ - {0, dummy}, /* 48 */ - {0, dummy}, /* 49 */ - {0, dummy}, /* 50 */ -#endif - {-1, /* variable */ handleGameparams}, {-1, /* variable */ handleExtension1}, {sizeof (struct terrain_packet2), handleTerrain2}, /* 53 */ {sizeof (struct terrain_info_packet2), handleTerrainInfo2}, /* 54 */ {0, dummy}, /* 55 */ - -#ifdef SHORT_PACKETS /* S_P2 */ {0, dummy}, /* SP_S_SEQUENCE not yet * implemented */ {-1, handleVPhaser}, /* SP_S_PHASER */ {-1, handleVKills}, /* SP_S_KILLS */ {sizeof (struct stats_s_spacket), handle_s_Stats}, /* SP_S_STATS */ -#else - {0, dummy}, /* 56 */ - {0, dummy}, /* 57 */ - {0, dummy}, /* 58 */ - {0, dummy}, /* 59 */ -#endif - {sizeof (struct feature_cpacket), handleFeature}, /* CP_FEATURE; 60 */ {sizeof (struct rank_spacket), handleRank}, /* SP_RANK */ {sizeof (struct ltd_spacket), handleLtd}, /* SP_LTD */ @@ -244,17 +213,9 @@ 0, /* 40 */ 0, /* 41 */ sizeof (struct ping_cpacket), /* CP_PING_RESPONSE */ - -#ifdef SHORT_PACKETS sizeof (struct shortreq_cpacket), /* CP_S_REQ */ sizeof (struct threshold_cpacket), /* CP_S_THRS */ -1, /* CP_S_MESSAGE */ -#else - 0, /* 43 */ - 0, /* 44 */ - 0, /* 45 */ -#endif - 0, /* 46 */ 0, /* 47 */ 0, /* 48 */ @@ -1129,7 +1090,6 @@ } size = handlers[*bufptr].size; -#ifdef SHORT_PACKETS if (size == -1) { /* variable packet */ size = getvpsize (bufptr); @@ -1145,7 +1105,6 @@ size, *bufptr); } } -#endif /* SHORT_PACKETS */ if (packetLights) light_receive(); @@ -2214,7 +2173,6 @@ { struct mesg_cpacket mesPacket; -#ifdef SHORT_PACKETS if (recv_short) { int size; @@ -2229,8 +2187,6 @@ mesPacket.type = CP_S_MESSAGE; } else -#endif - mesPacket.type = CP_MESSAGE; mesPacket.group = (char) group; mesPacket.indiv = (char) indiv; @@ -4210,14 +4166,12 @@ if (req == COMM_UPDATE) { -#ifdef SHORT_PACKETS if (recv_short) { /* not necessary */ /* Let the client do the work, and not the network :-) */ resetWeaponInfo (); } -#endif sendServerPacket ((struct player_spacket *) &packet); warning ("Sent request for full update"); @@ -4852,10 +4806,8 @@ outpacket_log[tpe]++; outdata_this_sec += size; -#ifdef SHORT_PACKETS if (tpe == CP_S_MESSAGE) cp_msg_size += size; /* HW */ -#endif } /* print out out the cool information on packet logging */ @@ -4884,7 +4836,6 @@ (int) sqrt ((numpl * sout2 - sumout * sumout) / (numpl * (numpl - 1)))); -#ifdef SHORT_PACKETS /* total_bytes = ALL_BYTES; *//* Hope this works HW */ for (i = 0; i <= NUM_PACKETS; i++) { /* I think it must be <= */ @@ -4894,24 +4845,13 @@ total_bytes += vari_sizes[i]; } /* The result should be == * ALL_BYTES HW */ -#else - for (i = 0; i <= NUM_PACKETS; i++) - { - total_bytes += handlers[i].size * packet_log[i]; - } -#endif for (i = 0; i <= NUM_SIZES; i++) { - -#ifdef SHORT_PACKETS if (handlers[i].size != -1) outtotal_bytes += outpacket_log[i] * sizes[i]; else outtotal_bytes += cp_msg_size; /* HW */ -#else - outtotal_bytes += outpacket_log[i] * sizes[i]; -#endif } LineToConsole ("Total bytes received %d, average CPS: %4.1f\n", @@ -4920,8 +4860,6 @@ LineToConsole ("Num #Rcvd Size TotlBytes %%Total\n"); for (i = 0; i <= NUM_PACKETS; i++) { - -#ifdef SHORT_PACKETS if (handlers[i].size != -1) calc_temp = handlers[i].size * packet_log[i]; else @@ -4930,12 +4868,6 @@ LineToConsole ("%3d %5d %4d %9d %3.2f\n", i, packet_log[i], handlers[i].size, calc_temp, (float) (calc_temp * 100 / total_bytes)); -#else - calc_temp = handlers[i].size * packet_log[i]; - LineToConsole ("%3d %5d %4d %9d %3.2f\n", - i, packet_log[i], handlers[i].size, calc_temp, - (float) (calc_temp * 100 / total_bytes)); -#endif } LineToConsole ("Total bytes sent %d, average CPS: %4.1f\n", outtotal_bytes, (float) (outtotal_bytes / (Now - Start_Time))); @@ -4943,8 +4875,6 @@ LineToConsole ("Num #Sent Size TotlBytes %%Total\n"); for (i = 0; i <= NUM_SIZES; i++) { - -#ifdef SHORT_PACKETS if (sizes[i] == -1) calc_temp = cp_msg_size; else @@ -4953,13 +4883,6 @@ i, outpacket_log[i], sizes[i], calc_temp, (float) (calc_temp * 100 / outtotal_bytes)); } -#else - calc_temp = sizes[i] * outpacket_log[i]; - LineToConsole ("%3d %5d %4d %9d %3.2f\n", - i, outpacket_log[i], sizes[i], calc_temp, - (float) (calc_temp * 100 / outtotal_bytes)); - } -#endif } void print_packet(char *packet, int size) @@ -5394,7 +5317,6 @@ ((struct ship_cap_spacket *) packet)->s_desig2, ntohs(((struct ship_cap_spacket *) packet)->s_bitmap) ); break; -#ifdef SHORT_PACKETS case SP_S_REPLY : /* reply to send-short * * * request */ LineToConsole("\nS->C SP_S_REPLY\t"); @@ -5456,7 +5378,6 @@ ntohl(((struct player_s_spacket *) packet)->x), ntohl(((struct player_s_spacket *) packet)->y) ); break; -#endif case SP_PING : /* ping packet */ LineToConsole("\nS->C SP_PING\t"); if (log_packets > 1) @@ -5659,7 +5580,6 @@ ntohl(lp->wsdt) ); } break; -#ifdef SHORT_PACKETS case SP_S_TORP : /* variable length torp * * * packet */ LineToConsole("\nS->C SP_S_TORP\t"); @@ -5751,13 +5671,12 @@ ntohl(((struct stats_spacket *) packet)->maxkills), ntohl(((struct stats_spacket *) packet)->sbmaxkills) ); break; -#endif default: LineToConsole("\nS->C UNKNOWN\t"); if (log_packets > 1) LineToConsole(" type=%d,",packet[0]); } -#ifdef nodef /* #ifdef SHORT_PACKETS */ +#ifdef nodef /* Short packet stuff */ switch( *((char *) packet) ) { /* variable length packets */ @@ -6039,7 +5958,6 @@ ntohl(((struct ping_cpacket *) packet)->cp_sent), ntohl(((struct ping_cpacket *) packet)->cp_recv) ); break; -#ifdef SHORT_PACKETS case CP_S_REQ : LineToConsole("\nC->S CP_S_REQ\t"); if (log_packets > 1) @@ -6072,7 +5990,6 @@ if (log_packets > 1) LineToConsole(" no struct defined,"); break; -#endif case CP_FEATURE : LineToConsole("\nC->S CP_FEATURE\t"); if (log_packets > 1) Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.126 retrieving revision 1.127 diff -u -d -r1.126 -r1.127 --- data.c 8 Jun 2009 22:26:07 -0000 1.126 +++ data.c 8 Jun 2009 22:55:03 -0000 1.127 @@ -243,7 +243,6 @@ int SBhours = 0; -#ifdef SHORT_PACKETS int why_dead = 0; int tryShort = 1; /* for .xtrekrc option */ int tryShort1 = 0; @@ -254,8 +253,6 @@ char recv_threshold_s[8] = { '0', '\0' }; int recv_warn = 1; -#endif - int updatesPerSec = 10; /* client requested updates per second */ int lastUpdateSpeed = 10; /* last update speed client requested */ int server_ups = 10; /* server responded updates per second */ @@ -465,11 +462,8 @@ W_Window udpWin, phaserwin, hintWin; W_Window waitWin, waitqWin, countWin, motdButtonWin, motdWin; -#ifdef SHORT_PACKETS W_Window spWin = NULL; -#endif - #ifdef NBT W_Window macroWin = NULL; Index: defwin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defwin.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- defwin.c 9 May 2009 21:21:43 -0000 1.7 +++ defwin.c 8 Jun 2009 22:55:03 -0000 1.8 @@ -300,7 +300,6 @@ ,} ,} , -#ifdef SHORT_PACKETS { "tryShort", BOOL_DEF, "Use short packets for communications", &tryShort1, { @@ -309,7 +308,6 @@ ,} ,} , -#endif { "tryUdp", BOOL_DEF, "Use UDP for communications", &tryUdp1, { Index: helpwin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/helpwin.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- helpwin.c 19 Apr 2008 16:22:59 -0000 1.15 +++ helpwin.c 8 Jun 2009 22:55:03 -0000 1.16 @@ -135,13 +135,9 @@ "+ Show UDP options window", "= Update all", ", Ping stats window", - -#ifdef SHORT_PACKETS "` Toggle PacketWindow", "- Update small", "| Update medium", -#endif /* SHORT_PACKETS */ - " (space) Unmap special windows", "\\ Reset user timer", Index: option.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/option.c,v retrieving revision 1.60 retrieving revision 1.61 diff -u -d -r1.60 -r1.61 --- option.c 23 May 2009 13:23:39 -0000 1.60 +++ option.c 8 Jun 2009 22:55:04 -0000 1.61 @@ -393,9 +393,7 @@ #endif {1, "show UDP control window", 0, &udpWin, 0, 0, NULL, NULL}, {1, "show ping stats window", 0, &pStats, 0, 0, NULL}, -#ifdef SHORT_PACKETS {1, "show short packets window", 0, &spWin, 0, 0, NULL, NULL}, -#endif {1, "done", ¬done, 0, 0, 0, NULL, NULL}, {-1, NULL, 0, 0, 0, 0, NULL, NULL} }; Index: defaults.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v retrieving revision 1.100 retrieving revision 1.101 diff -u -d -r1.100 -r1.101 --- defaults.c 6 Jun 2009 03:29:08 -0000 1.100 +++ defaults.c 8 Jun 2009 22:55:03 -0000 1.101 @@ -867,14 +867,12 @@ NULL } }, -#ifdef SHORT_PACKETS {"tryShort", &tryShort, RC_BOOL, { "Use short packets for communications", NULL } }, -#endif {"tryUdp", &tryUdp, RC_BOOL, { "Use UDP for communications", @@ -1866,10 +1864,8 @@ udpSequenceCheck = booleanDefault ("udpSequenceCheck", udpSequenceCheck); baseUdpLocalPort = intDefault ("baseUdpLocalPort", baseUdpLocalPort); -#ifdef SHORT_PACKETS tryShort = booleanDefault ("tryShort", tryShort); tryShort1 = tryShort; -#endif newDistress = booleanDefault ("newDistress", newDistress); rejectMacro = booleanDefault ("rejectMacro", rejectMacro); @@ -1963,9 +1959,7 @@ updateWindowsGeometry (reviewWin); updateWindowsGeometry (pStats); updateWindowsGeometry (udpWin); -#ifdef SHORT_PACKETS updateWindowsGeometry (spWin); -#endif #ifdef SOUND updateWindowsGeometry (soundWin); #endif @@ -2745,7 +2739,6 @@ fputs (str, fp); fputs ("\n", fp); -#ifdef SHORT_PACKETS // Short packets window if ((adefault = stringDefault ("network.parent")) != NULL) { @@ -2760,7 +2753,6 @@ W_IsMapped (spWin) ? "on" : "off"); fputs (str, fp); fputs ("\n", fp); -#endif #ifdef TOOLS // Tools window From modemhero at users.sourceforge.net Mon Jun 8 17:55:06 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 08 Jun 2009 22:55:06 +0000 Subject: [netrek-cvs] client/netrekxp/win32 config.h,1.23,1.24 Message-ID: Update of /cvsroot/netrek/client/netrekxp/win32 In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv7322/win32 Modified Files: config.h Log Message: Remove SHORT_PACKETS define Index: config.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/win32/config.h,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- config.h 8 Jun 2009 22:26:07 -0000 1.23 +++ config.h 8 Jun 2009 22:55:04 -0000 1.24 @@ -27,14 +27,6 @@ /* ------------------------------------------------------------ - Common defines - ------------------------------------------------------------ -*/ -/* SHORT_PACKETS - Reduce Network load */ -#define SHORT_PACKETS - -/* - ------------------------------------------------------------ Client defines ------------------------------------------------------------ */ From modemhero at users.sourceforge.net Mon Jun 8 19:08:06 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 09 Jun 2009 00:08:06 +0000 Subject: [netrek-cvs] client/netrekxp/win32 config.h,1.24,1.25 Message-ID: Update of /cvsroot/netrek/client/netrekxp/win32 In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv16050/win32 Modified Files: config.h Log Message: Remove ARMY_SLIDER define. Remove unnecessary updating of stat win when kill packet received, as stat win does not have a slider for armies/kills. Index: config.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/win32/config.h,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- config.h 8 Jun 2009 22:55:04 -0000 1.24 +++ config.h 9 Jun 2009 00:08:04 -0000 1.25 @@ -40,9 +40,6 @@ /* CORRUPTED_PACKETS - prevents some seg faults but verbose output */ #define CORRUPTED_PACKETS -/* ARMY_SLIDER - some sort of funky status window thing */ -#define ARMY_SLIDER - /* META - show active servers via metaserver - NBT */ #define META From modemhero at users.sourceforge.net Mon Jun 8 19:08:06 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 09 Jun 2009 00:08:06 +0000 Subject: [netrek-cvs] client/netrekxp/src short.c, 1.30, 1.31 socket.c, 1.72, 1.73 Message-ID: Update of /cvsroot/netrek/client/netrekxp/src In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv16050/src Modified Files: short.c socket.c Log Message: Remove ARMY_SLIDER define. Remove unnecessary updating of stat win when kill packet received, as stat win does not have a slider for armies/kills. Index: short.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/short.c,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- short.c 8 Jun 2009 22:55:04 -0000 1.30 +++ short.c 9 Jun 2009 00:08:04 -0000 1.31 @@ -1990,14 +1990,6 @@ players[pnum].p_kills = (float) (pkills / 100.0); /* FAT: prevent redundant player update */ PlistNoteUpdate (pnum); - -#ifdef ARMY_SLIDER - if (me == &players[(int) pnum]) - { - calibrate_stats (); - redrawStats (); - } -#endif /* ARMY_SLIDER */ } } /* for */ Index: socket.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/socket.c,v retrieving revision 1.72 retrieving revision 1.73 diff -u -d -r1.72 -r1.73 --- socket.c 8 Jun 2009 22:55:04 -0000 1.72 +++ socket.c 9 Jun 2009 00:08:04 -0000 1.73 @@ -2097,14 +2097,6 @@ players[packet->pnum].p_kills = (float) (ntohl (packet->kills) / 100.0); /* FAT: prevent redundant player update */ PlistNoteUpdate (packet->pnum); - -#ifdef ARMY_SLIDER - if (me == &players[packet->pnum]) - { - calibrate_stats (); - redrawStats (); - } -#endif /* ARMY_SLIDER */ } } From modemhero at users.sourceforge.net Mon Jun 8 19:08:06 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 09 Jun 2009 00:08:06 +0000 Subject: [netrek-cvs] client/netrekxp/include struct.h,1.34,1.35 Message-ID: Update of /cvsroot/netrek/client/netrekxp/include In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv16050/include Modified Files: struct.h Log Message: Remove ARMY_SLIDER define. Remove unnecessary updating of stat win when kill packet received, as stat win does not have a slider for armies/kills. Index: struct.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/struct.h,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- struct.h 23 May 2009 15:21:19 -0000 1.34 +++ struct.h 9 Jun 2009 00:08:04 -0000 1.35 @@ -410,12 +410,7 @@ * onto, set only client */ short pl_orbit; /* Planet orbiting, sent by server */ short p_playerl; /* Player locked onto */ - -#ifdef ARMY_SLIDER int p_armies; /* XXX: for stats */ -#else - short p_armies; -#endif /* ARMY_SLIDER */ int p_fuel; short p_explode; /* Keeps track of final * explosion */ From modemhero at users.sourceforge.net Mon Jun 8 19:16:38 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 09 Jun 2009 00:16:38 +0000 Subject: [netrek-cvs] client/netrekxp/win32 config.h,1.25,1.26 Message-ID: Update of /cvsroot/netrek/client/netrekxp/win32 In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv17624/win32 Modified Files: config.h Log Message: Remove NBT define. Was defined in 2 places, what dreck. Index: config.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/win32/config.h,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- config.h 9 Jun 2009 00:08:04 -0000 1.25 +++ config.h 9 Jun 2009 00:16:36 -0000 1.26 @@ -34,9 +34,6 @@ /* THREADED - Multi-threaded input handling */ #define THREADED -/* NBT - Nick trown's macro code */ -#define NBT - /* CORRUPTED_PACKETS - prevents some seg faults but verbose output */ #define CORRUPTED_PACKETS From modemhero at users.sourceforge.net Mon Jun 8 19:16:38 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 09 Jun 2009 00:16:38 +0000 Subject: [netrek-cvs] client/netrekxp/src data.c, 1.127, 1.128 defaults.c, 1.101, 1.102 helpwin.c, 1.16, 1.17 input.c, 1.54, 1.55 newwin.c, 1.79, 1.80 Message-ID: Update of /cvsroot/netrek/client/netrekxp/src In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv17624/src Modified Files: data.c defaults.c helpwin.c input.c newwin.c Log Message: Remove NBT define. Was defined in 2 places, what dreck. Index: newwin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/newwin.c,v retrieving revision 1.79 retrieving revision 1.80 diff -u -d -r1.79 -r1.80 --- newwin.c 8 Jun 2009 22:55:04 -0000 1.79 +++ newwin.c 9 Jun 2009 00:16:36 -0000 1.80 @@ -1899,12 +1899,8 @@ else #endif fillhelp (); - -#ifdef NBT else if (event.Window == macroWin) fillmacro (); -#endif - else if (event.Window == playerw) RedrawPlayerList (); else if (event.Window == warnw) Index: input.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/input.c,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- input.c 8 Jun 2009 22:55:03 -0000 1.54 +++ input.c 9 Jun 2009 00:16:36 -0000 1.55 @@ -2055,19 +2055,14 @@ *target; int targettype; enum dist_type i; - -#ifdef NBT int c; char who; int found = 0; -#endif - warning (" "); /* We are here now, so turn off macro mode */ MacroMode = 0; -#ifdef NBT if (data->key == '?') { showMacroWin (); @@ -2255,8 +2250,6 @@ warning ("Unknown macro"); W_Beep (); - -#endif } /******************************************************************************/ @@ -2285,10 +2278,7 @@ destroyInfo (); W_UnmapWindow (helpWin); W_UnmapWindow (playerw2); - -#ifdef NBT W_UnmapWindow (macroWin); -#endif #ifdef XTREKRC_HELP if (defWin) Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.127 retrieving revision 1.128 diff -u -d -r1.127 -r1.128 --- data.c 8 Jun 2009 22:55:03 -0000 1.127 +++ data.c 9 Jun 2009 00:16:36 -0000 1.128 @@ -272,14 +272,10 @@ #endif #endif - -#ifdef NBT struct macro_list macro[MAX_MACRO]; /* NBT 2/26/93 */ int MacroMode = 0; int macrocnt = 0; -#endif - extern double Sin[], Cos[]; int paradise = 0; /* is the server a paradise server */ @@ -463,12 +459,8 @@ W_Window waitWin, waitqWin, countWin, motdButtonWin, motdWin; W_Window spWin = NULL; - -#ifdef NBT W_Window macroWin = NULL; -#endif - #ifdef META W_Window metaWin = NULL; Index: helpwin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/helpwin.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- helpwin.c 8 Jun 2009 22:55:03 -0000 1.16 +++ helpwin.c 9 Jun 2009 00:16:36 -0000 1.17 @@ -140,11 +140,8 @@ "| Update medium", " (space) Unmap special windows", "\\ Reset user timer", - -#ifdef NBT "X Enter Macro Mode", "X? Show current Macros", -#endif #ifdef TOOLS "M Toggle shell tools window", Index: defaults.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v retrieving revision 1.101 retrieving revision 1.102 diff -u -d -r1.101 -r1.102 --- defaults.c 8 Jun 2009 22:55:03 -0000 1.101 +++ defaults.c 9 Jun 2009 00:16:36 -0000 1.102 @@ -1104,9 +1104,7 @@ LineToConsole ("Reading defaults file %s\n", deffile); -#ifdef NBT macrocnt = 0; /* reset macros */ -#endif STRNCPY (defaultsFile, deffile, sizeof (defaultsFile)); while (fgets (file, 250, fp)) @@ -1129,7 +1127,6 @@ v++; } -#ifdef NBT /* not very robust but if it breaks nothing will die horribly I think - * jmn */ if (strncmpi (file, "macro.", 6) == 0) @@ -1171,7 +1168,6 @@ } } else -#endif if (strncmpi (file, "mac.", 4) == 0) { @@ -3098,7 +3094,6 @@ { switch (macro[i].type) { -#ifdef NBT case NBTM: if (macro[i].key != 0) { @@ -3118,7 +3113,6 @@ fputs ("\n", fp); } break; -#endif /* NBT */ case NEWM: if (macro[i].key != 0) { @@ -3190,7 +3184,6 @@ fputs ("\n", fp); } break; -#ifdef NBT #ifdef MULTILINE_MACROS case NEWMULTIM: if (macro[i].key != 0) @@ -3213,7 +3206,6 @@ } break; #endif /* MULTILINE_MACROS */ -#endif /* NBT */ } } } From modemhero at users.sourceforge.net Mon Jun 8 19:16:38 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 09 Jun 2009 00:16:38 +0000 Subject: [netrek-cvs] client/netrekxp/include data.h, 1.115, 1.116 defs.h, 1.38, 1.39 Message-ID: Update of /cvsroot/netrek/client/netrekxp/include In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv17624/include Modified Files: data.h defs.h Log Message: Remove NBT define. Was defined in 2 places, what dreck. Index: defs.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/defs.h,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- defs.h 8 Jun 2009 22:55:03 -0000 1.38 +++ defs.h 9 Jun 2009 00:16:36 -0000 1.39 @@ -33,9 +33,7 @@ /* #$!@$#% length of address field of messages */ #define ADDRLEN 10 -#ifdef NBT #define MAX_MACRO 500 -#endif #define MAXPLAYER 257 /* Paradise can apparently go over 36 ... for most purposes, the nplayers variable will be @@ -417,10 +415,6 @@ #define SPK_TFIELD 4 #define SPK_DONE 5 -#ifndef NBT -#define NBT -#endif /* NBT */ - #define MAXMACLEN 85 #define NBTM 0 #define NEWM 1 Index: data.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v retrieving revision 1.115 retrieving revision 1.116 diff -u -d -r1.115 -r1.116 --- data.h 8 Jun 2009 22:55:03 -0000 1.115 +++ data.h 9 Jun 2009 00:16:36 -0000 1.116 @@ -139,13 +139,10 @@ #define NUM_DIST 27 /* Number of distress macros */ -#ifdef NBT extern int MacroMode; extern int macrocnt; extern struct macro_list macro[]; /* NBT 2/26/93 */ -#endif - #ifdef ROTATERACE extern int autoRotate; extern int rotate; @@ -451,12 +448,8 @@ extern W_Window waitWin, waitqWin, countWin, motdButtonWin, motdWin; extern W_Window spWin; - -#ifdef NBT extern W_Window macroWin; -#endif - #ifdef META extern W_Window metaWin; From modemhero at users.sourceforge.net Mon Jun 8 19:28:12 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 09 Jun 2009 00:28:12 +0000 Subject: [netrek-cvs] client/netrekxp/src data.c, 1.128, 1.129 defaults.c, 1.102, 1.103 local.c, 1.119, 1.120 option.c, 1.61, 1.62 Message-ID: Update of /cvsroot/netrek/client/netrekxp/src In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19465/src Modified Files: data.c defaults.c local.c option.c Log Message: Remove JUBILEE_PHASER define. No idea why this was ever a define. Also, the code in local.c for the case where JUBILEE_PHASER was not defined lacked handling of case PHHIT2. Index: local.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v retrieving revision 1.119 retrieving revision 1.120 diff -u -d -r1.119 -r1.120 --- local.c 8 Jun 2009 22:55:03 -0000 1.119 +++ local.c 9 Jun 2009 00:28:10 -0000 1.120 @@ -1740,11 +1740,9 @@ php = &phasers[j->p_no]; /* Reset colorful phasers here */ -#ifdef JUBILEE_PHASERS if (j == me && colorfulPhasers && (php->ph_status == PHFREE || php->ph_updateFuse == 0)) ph_col = 0; -#endif if (php->ph_status != PHFREE) { @@ -1895,7 +1893,6 @@ if (friendlyPlayer (j)) { -#ifdef JUBILEE_PHASERS if (isMe(j) && php->ph_status == PHHIT && colorfulPhasers) { int col; @@ -1943,17 +1940,6 @@ else W_CacheLine (w, px, py, tx, ty, shipCol[remap[j->p_team]]); } -#else - if (highlightFriendlyPhasers && (php->ph_status == PHHIT)) - W_CacheLine (w, px, py, tx, ty, foreColor); - else - { - if ((php->ph_fuse % 2) == 1) - W_CacheLine (w, px, py, tx, ty, foreColor); - else - W_CacheLine (w, px, py, tx, ty, shipCol[remap[j->p_team]]); - } -#endif php->ph_fuse++; clearline[0][clearlcount] = px; Index: defaults.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v retrieving revision 1.102 retrieving revision 1.103 diff -u -d -r1.102 -r1.103 --- defaults.c 9 Jun 2009 00:16:36 -0000 1.102 +++ defaults.c 9 Jun 2009 00:28:10 -0000 1.103 @@ -105,14 +105,12 @@ NULL } }, -#ifdef JUBILEE_PHASERS {"colorfulPhasers", &colorfulPhasers, RC_BOOL, { "Display color phasers", NULL } }, -#endif {"colorWeapons", &colorWeapons, RC_BOOL, { "Use colored bitmaps for torps and plasmas", @@ -1903,10 +1901,7 @@ infoRange = booleanDefault ("infoRange", infoRange); showMySpeed = booleanDefault ("showMySpeed", showMySpeed); showOtherSpeed = booleanDefault ("showOtherSpeed", showOtherSpeed); - -#ifdef JUBILEE_PHASERS colorfulPhasers = booleanDefault ("colorfulPhasers", colorfulPhasers); -#endif #ifdef SOUND sound_init = booleanDefault ("sound", sound_init); Index: option.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/option.c,v retrieving revision 1.61 retrieving revision 1.62 diff -u -d -r1.61 -r1.62 --- option.c 8 Jun 2009 22:55:04 -0000 1.61 +++ option.c 9 Jun 2009 00:28:10 -0000 1.62 @@ -301,9 +301,7 @@ {1, "use auto aim phasers", &autoPhaser, 0, 0, 0, NULL, NULL}, {1, "use color weapon bitmaps", &colorWeapons, 0, 0, 0, NULL, NULL}, {1, "show weapons on galactic", &weaponsOnMap, 0, 0, 0, NULL, NULL}, -#ifdef JUBILEE_PHASERS {1, "use colorful phasers", &colorfulPhasers, 0, 0, 0, NULL, NULL}, -#endif {1, "highlight friendly phasers", &highlightFriendlyPhasers, 0, 0, 0, NULL, NULL}, {1, "enemy phaser width: %d", &enemyPhasers, 0, 0, 0, NULL, &enPhasRng}, {1, "", &phaserShrinkStyle, 0, 0, 0, shrinkphasermess, NULL}, Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.128 retrieving revision 1.129 diff -u -d -r1.128 -r1.129 --- data.c 9 Jun 2009 00:16:36 -0000 1.128 +++ data.c 9 Jun 2009 00:28:10 -0000 1.129 @@ -499,10 +499,7 @@ int showMySpeed = 1; int showOtherSpeed = 1; - -#ifdef JUBILEE_PHASERS int colorfulPhasers = 0; -#endif /* tried to automate this as much as possible... the entries are * the * character, string identifier, and the default macro for * each distress From modemhero at users.sourceforge.net Mon Jun 8 19:28:12 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 09 Jun 2009 00:28:12 +0000 Subject: [netrek-cvs] client/netrekxp/win32 config.h,1.26,1.27 Message-ID: Update of /cvsroot/netrek/client/netrekxp/win32 In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19465/win32 Modified Files: config.h Log Message: Remove JUBILEE_PHASER define. No idea why this was ever a define. Also, the code in local.c for the case where JUBILEE_PHASER was not defined lacked handling of case PHHIT2. Index: config.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/win32/config.h,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- config.h 9 Jun 2009 00:16:36 -0000 1.26 +++ config.h 9 Jun 2009 00:28:10 -0000 1.27 @@ -73,9 +73,6 @@ /* VSHIELD_BITMAPS - damage dependent shields (hull) */ #define VSHIELD_BITMAPS -/* JUBILEE_PHASERS - Cycle phaser color when it's a hit */ -#define JUBILEE_PHASERS - /* WARP_DEAD - Use death detection */ #undef WARP_DEAD From modemhero at users.sourceforge.net Mon Jun 8 19:28:12 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 09 Jun 2009 00:28:12 +0000 Subject: [netrek-cvs] client/netrekxp/include data.h,1.116,1.117 Message-ID: Update of /cvsroot/netrek/client/netrekxp/include In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19465/include Modified Files: data.h Log Message: Remove JUBILEE_PHASER define. No idea why this was ever a define. Also, the code in local.c for the case where JUBILEE_PHASER was not defined lacked handling of case PHHIT2. Index: data.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v retrieving revision 1.116 retrieving revision 1.117 diff -u -d -r1.116 -r1.117 --- data.h 9 Jun 2009 00:16:36 -0000 1.116 +++ data.h 9 Jun 2009 00:28:10 -0000 1.117 @@ -163,10 +163,7 @@ extern int showMySpeed; extern int showOtherSpeed; - -#ifdef JUBILEE_PHASERS extern int colorfulPhasers; -#endif extern int why_dead; extern int tryShort, tryShort1; From modemhero at users.sourceforge.net Mon Jun 8 20:04:36 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 09 Jun 2009 01:04:36 +0000 Subject: [netrek-cvs] client/netrekxp/win32 config.h,1.27,1.28 Message-ID: Update of /cvsroot/netrek/client/netrekxp/win32 In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv25648/win32 Modified Files: config.h Log Message: Remove CONTROL_KEY define, add comment about sensing if control key is down in the keyboard handler function. Remove RABBIT_EARS, USE_PORTSWAP, NEW_DASHBOARD_2, these defines were unused. Remove UDP_PORTSWAP define. Fix bug in sendUdpReq() if portswap was off with UDP_PORTSWAP defined. Index: config.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/win32/config.h,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- config.h 9 Jun 2009 00:28:10 -0000 1.27 +++ config.h 9 Jun 2009 01:04:33 -0000 1.28 @@ -84,14 +84,11 @@ #define PLIST1 #define PLIST -#define CONTROL_KEY #define BRMH #define DOC_WIN -#define RABBIT_EARS #define ROTATERACE /* client options */ -#define NEW_DASHBOARD_2 #define MOUSE_AS_SHIFT #define SHIFTED_MOUSE #define MOTION_MOUSE @@ -99,11 +96,6 @@ #define XTRA_MESSAGE_UI #define PHASER_STATS - -/* Swap ports around to try to go through firewalls */ -#define UDP_PORTSWAP -#define USE_PORTSWAP - /* Enabled playback of recorded games */ #define RECORDGAME From modemhero at users.sourceforge.net Mon Jun 8 20:04:35 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 09 Jun 2009 01:04:35 +0000 Subject: [netrek-cvs] client/netrekxp/include data.h, 1.117, 1.118 proto.h, 1.69, 1.70 Message-ID: Update of /cvsroot/netrek/client/netrekxp/include In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv25648/include Modified Files: data.h proto.h Log Message: Remove CONTROL_KEY define, add comment about sensing if control key is down in the keyboard handler function. Remove RABBIT_EARS, USE_PORTSWAP, NEW_DASHBOARD_2, these defines were unused. Remove UDP_PORTSWAP define. Fix bug in sendUdpReq() if portswap was off with UDP_PORTSWAP defined. Index: data.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v retrieving revision 1.117 retrieving revision 1.118 diff -u -d -r1.117 -r1.118 --- data.h 9 Jun 2009 00:28:10 -0000 1.117 +++ data.h 9 Jun 2009 01:04:33 -0000 1.118 @@ -569,11 +569,6 @@ #endif -#ifdef CONTROL_KEY -extern int use_control_key; - -#endif - #ifdef DOC_WIN extern W_Window docwin, xtrekrcwin; extern int maxdoclines, maxxtrekrclines; @@ -655,9 +650,7 @@ extern int F_dead_warp; #endif -#ifdef UDP_PORTSWAP extern int portSwap; -#endif // Load Ship Bitmaps from .BMP files extern char *fed_ship_bmp; Index: proto.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/proto.h,v retrieving revision 1.69 retrieving revision 1.70 diff -u -d -r1.69 -r1.70 --- proto.h 8 Jun 2009 22:26:07 -0000 1.69 +++ proto.h 9 Jun 2009 01:04:33 -0000 1.70 @@ -1161,9 +1161,7 @@ struct udp_reply_spacket; void handleUdpReply (struct udp_reply_spacket *packet); int openUdpConn (void); -#ifdef UDP_PORTSWAP int connUdpConn (); -#endif int recvUdpConn (void); int closeUdpConn (void); void printUdpInfo (void); From modemhero at users.sourceforge.net Mon Jun 8 20:04:41 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 09 Jun 2009 01:04:41 +0000 Subject: [netrek-cvs] client/netrekxp/resources/netrekrc netrekrc.txt, 1.15, 1.16 Message-ID: Update of /cvsroot/netrek/client/netrekxp/resources/netrekrc In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv25692 Modified Files: netrekrc.txt Log Message: Remove CONTROL_KEY define, add comment about sensing if control key is down in the keyboard handler function. Remove RABBIT_EARS, USE_PORTSWAP, NEW_DASHBOARD_2, these defines were unused. Remove UDP_PORTSWAP define. Fix bug in sendUdpReq() if portswap was off with UDP_PORTSWAP defined. Index: netrekrc.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/netrekrc/netrekrc.txt,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- netrekrc.txt 6 Jun 2009 03:29:20 -0000 1.15 +++ netrekrc.txt 9 Jun 2009 01:04:39 -0000 1.16 @@ -309,7 +309,7 @@ # Port to connect port: 2592 -# Use new UDP code +# Swap ports around to try to use UDP through firewalls portSwap: on # Put a small tic mark on the puck to indicate its direction From modemhero at users.sourceforge.net Mon Jun 8 20:04:36 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 09 Jun 2009 01:04:36 +0000 Subject: [netrek-cvs] client/netrekxp/src data.c, 1.129, 1.130 defaults.c, 1.103, 1.104 mswindow.c, 1.94, 1.95 socket.c, 1.73, 1.74 Message-ID: Update of /cvsroot/netrek/client/netrekxp/src In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv25648/src Modified Files: data.c defaults.c mswindow.c socket.c Log Message: Remove CONTROL_KEY define, add comment about sensing if control key is down in the keyboard handler function. Remove RABBIT_EARS, USE_PORTSWAP, NEW_DASHBOARD_2, these defines were unused. Remove UDP_PORTSWAP define. Fix bug in sendUdpReq() if portswap was off with UDP_PORTSWAP defined. Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.94 retrieving revision 1.95 diff -u -d -r1.94 -r1.95 --- mswindow.c 8 Jun 2009 22:55:03 -0000 1.94 +++ mswindow.c 9 Jun 2009 01:04:33 -0000 1.95 @@ -2501,14 +2501,11 @@ EventQueue[EventTail].type = W_EV_KEY; -#ifdef CONTROL_KEY - if (use_control_key && (GetKeyState (VK_CONTROL) & ~0x1)) + /* Check if it control key is down - use control keymap */ + if (GetKeyState (VK_CONTROL) & ~0x1) EventQueue[EventTail].key = (unsigned char) (j + 96); else EventQueue[EventTail].key = (unsigned char) j; -#else - EventQueue[EventTail].key = (unsigned char) j; -#endif return (0); case WM_MOUSEMOVE: Index: defaults.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v retrieving revision 1.103 retrieving revision 1.104 diff -u -d -r1.103 -r1.104 --- defaults.c 9 Jun 2009 00:28:10 -0000 1.103 +++ defaults.c 9 Jun 2009 01:04:33 -0000 1.104 @@ -530,14 +530,12 @@ NULL } }, -#ifdef UDP_PORTSWAP {"portSwap", &portSwap, RC_BOOL, { - "Use new UDP code", + "Swap ports around to try to use UDP through firewalls", NULL } }, -#endif {"puckArrow", &puckArrow, RC_BOOL, { "Put a small tic mark on the puck to indicate its direction", @@ -1911,9 +1909,7 @@ shellTools = booleanDefault ("shellTools", shellTools); #endif -#ifdef UDP_PORTSWAP portSwap = booleanDefault ("portSwap", TRUE); -#endif #ifdef BEEPLITE defLite = booleanDefault("defLite", defLite); Index: socket.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/socket.c,v retrieving revision 1.73 retrieving revision 1.74 diff -u -d -r1.73 -r1.74 --- socket.c 9 Jun 2009 00:08:04 -0000 1.73 +++ socket.c 9 Jun 2009 01:04:33 -0000 1.74 @@ -4209,12 +4209,10 @@ } #endif -#ifdef UDP_PORTSWAP if (portSwap) packet.connmode = CONNMODE_PORT; /* have him send his port */ -#else - packet.connmode = CONNMODE_PACKET; /* we get addr from packet */ -#endif + else + packet.connmode = CONNMODE_PACKET; /* we get addr from packet */ sendServerPacket ((struct player_spacket *) &packet); @@ -4230,9 +4228,7 @@ UDPDIAG (("Sent request for %s mode\n", (req == COMM_TCP) ? "TCP" : "UDP")); -#ifdef UDP_PORTSWAP if (!portSwap) -#endif if ((req == COMM_UDP) && recvUdpConn () < 0) { UDPDIAG (("Sending TCP reset message\n")); @@ -4296,8 +4292,6 @@ } else { - -#ifdef UDP_PORTSWAP if (portSwap) { udpServerPort = ntohl (packet->port); @@ -4319,11 +4313,8 @@ goto send; } } -#else /* this came down UDP, so we MUST be connected */ /* (do the verify thing anyway just for kicks) */ -#endif - UDPDIAG (("Connected to server's UDP port\n")); commStatus = STAT_VERIFY_UDP; if (udpWin) @@ -4465,7 +4456,6 @@ return (0); } -#ifdef UDP_PORTSWAP int connUdpConn () { @@ -4488,8 +4478,6 @@ return (0); } -#endif - int recvUdpConn (void) { Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.129 retrieving revision 1.130 diff -u -d -r1.129 -r1.130 --- data.c 9 Jun 2009 00:28:10 -0000 1.129 +++ data.c 9 Jun 2009 01:04:33 -0000 1.130 @@ -667,11 +667,6 @@ #endif -#ifdef CONTROL_KEY -int use_control_key = 1; - -#endif - #ifdef DOC_WIN W_Window docwin = NULL, xtrekrcwin = NULL; int maxdoclines = 0, maxxtrekrclines = 0; @@ -752,9 +747,7 @@ int F_dead_warp = 0; #endif -#ifdef UDP_PORTSWAP -int portSwap = 0; -#endif +int portSwap = 0; /* Swap ports around to try to use UDP through firewalls */ // Load Ship Bitmaps from .BMP files char *fed_ship_bmp; From modemhero at users.sourceforge.net Mon Jun 8 20:23:03 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 09 Jun 2009 01:23:03 +0000 Subject: [netrek-cvs] client/netrekxp/win32 config.h,1.28,1.29 Message-ID: Update of /cvsroot/netrek/client/netrekxp/win32 In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28198/win32 Modified Files: config.h Log Message: Remove VSHIELD_BITMAPS define. Index: config.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/win32/config.h,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- config.h 9 Jun 2009 01:04:33 -0000 1.28 +++ config.h 9 Jun 2009 01:23:01 -0000 1.29 @@ -70,9 +70,6 @@ /* BEEPLITE - player and planets highlighting */ #define BEEPLITE -/* VSHIELD_BITMAPS - damage dependent shields (hull) */ -#define VSHIELD_BITMAPS - /* WARP_DEAD - Use death detection */ #undef WARP_DEAD From modemhero at users.sourceforge.net Mon Jun 8 20:23:03 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 09 Jun 2009 01:23:03 +0000 Subject: [netrek-cvs] client/netrekxp/src data.c, 1.130, 1.131 defaults.c, 1.104, 1.105 defwin.c, 1.8, 1.9 local.c, 1.120, 1.121 mswindow.c, 1.95, 1.96 newwin.c, 1.80, 1.81 option.c, 1.62, 1.63 Message-ID: Update of /cvsroot/netrek/client/netrekxp/src In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28198/src Modified Files: data.c defaults.c defwin.c local.c mswindow.c newwin.c option.c Log Message: Remove VSHIELD_BITMAPS define. Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.95 retrieving revision 1.96 diff -u -d -r1.95 -r1.96 --- mswindow.c 9 Jun 2009 01:04:33 -0000 1.95 +++ mswindow.c 9 Jun 2009 01:23:01 -0000 1.96 @@ -566,14 +566,8 @@ free (expview[i]); for (i = 0; i < BMP_SBEXPL_FRAMES; i++) free (sbexpview[i]); - -#ifdef VSHIELD_BITMAPS for (i = 0; i < SHIELD_FRAMES; i++) free (shield[i]); -#else - free (shield); -#endif - for (i = 0; i < BMP_HULL_FRAMES; i++) free (hull[i]); Index: newwin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/newwin.c,v retrieving revision 1.80 retrieving revision 1.81 diff -u -d -r1.80 -r1.81 --- newwin.c 9 Jun 2009 00:16:36 -0000 1.80 +++ newwin.c 9 Jun 2009 01:23:01 -0000 1.81 @@ -1502,12 +1502,6 @@ W_PointBitmap2 (base_sbexpview, 0, i, BMP_SBEXPL_WIDTH, BMP_SBEXPL_HEIGHT); } - -#ifndef VSHIELD_BITMAPS - shield = - W_StoreBitmap3 ("bitmaps/misclib/shield.bmp", BMP_SHIELD_WIDTH, - BMP_SHIELD_HEIGHT, BMP_SHIELD, w, LR_MONOCHROME); -#else base_vshield = W_StoreBitmap3 ("bitmaps/misclib/vshield.bmp", BMP_SHIELD_WIDTH, BMP_SHIELD_HEIGHT * SHIELD_FRAMES, BMP_SHIELD, w, @@ -1515,7 +1509,6 @@ for (i = 0; i < SHIELD_FRAMES; i++) shield[i] = W_PointBitmap2 (base_vshield, 0, i, BMP_SHIELD_WIDTH, BMP_SHIELD_HEIGHT); -#endif base_hull = W_StoreBitmap3 ("bitmaps/misclib/varyhull.bmp", hull_width, Index: local.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v retrieving revision 1.120 retrieving revision 1.121 diff -u -d -r1.120 -r1.121 --- local.c 9 Jun 2009 00:28:10 -0000 1.120 +++ local.c 9 Jun 2009 01:23:01 -0000 1.121 @@ -1295,7 +1295,6 @@ { int color = playerColor (j); -#ifdef VSHIELD_BITMAPS int shieldnum; if (isMe(j) && varyShields) @@ -1321,7 +1320,6 @@ } else color = playerColor (j); -#endif if (warnShields && isMe(j)) { @@ -1339,7 +1337,6 @@ } } -#ifdef VSHIELD_BITMAPS W_WriteScaleBitmap (dx - (BMP_SHIELD_WIDTH / 2) * SCALE / scaleFactor, dy - (BMP_SHIELD_HEIGHT / 2) * SCALE / scaleFactor, BMP_SHIELD_WIDTH * SCALE / scaleFactor, @@ -1347,15 +1344,6 @@ BMP_SHIELD_WIDTH, BMP_SHIELD_HEIGHT, 0, shield[shieldnum], color, w); -#else - W_WriteScaleBitmap (dx - (BMP_SHIELD_WIDTH / 2) * SCALE / scaleFactor, - dy - (BMP_SHIELD_HEIGHT / 2) * SCALE / scaleFactor, - BMP_SHIELD_WIDTH * SCALE / scaleFactor, - BMP_SHIELD_HEIGHT * SCALE / scaleFactor, - BMP_SHIELD_WIDTH, - BMP_SHIELD_HEIGHT, - 0, shield, color, w); -#endif } /* Warning hull */ if (vary_hull) Index: defaults.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v retrieving revision 1.104 retrieving revision 1.105 diff -u -d -r1.104 -r1.105 --- defaults.c 9 Jun 2009 01:04:33 -0000 1.104 +++ defaults.c 9 Jun 2009 01:23:01 -0000 1.105 @@ -966,7 +966,6 @@ } }, #endif -#ifdef VSHIELD_BITMAPS {"varyShields", &varyShields, RC_BOOL, { "Change shields graphic on shield damage", @@ -979,7 +978,6 @@ NULL } }, -#endif {"viewBox", &viewBox, RC_BOOL, { "Show limits of tactical display on galaxy", @@ -1808,10 +1806,8 @@ windowMove = booleanDefault ("windowMove", windowMove); -#ifdef VSHIELD_BITMAPS varyShields = booleanDefault ("varyShields", varyShields); varyShieldsColor = booleanDefault ("varyShieldsColor", varyShieldsColor); -#endif warnShields = booleanDefault ("warnShields", warnShields); vary_hull = booleanDefault("warnHull", vary_hull); Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.130 retrieving revision 1.131 diff -u -d -r1.130 -r1.131 --- data.c 9 Jun 2009 01:04:33 -0000 1.130 +++ data.c 9 Jun 2009 01:23:01 -0000 1.131 @@ -327,17 +327,11 @@ W_Icon etorp, mtorp; W_Icon eplasmatorp, mplasmatorp; -#ifdef VSHIELD_BITMAPS W_Icon base_vshield; W_Icon shield[SHIELD_FRAMES], cloakicon; int varyShields = 1; int varyShieldsColor = 1; -#else -W_Icon shield, cloakicon; - -#endif - W_Icon base_hull; W_Icon hull[BMP_HULL_FRAMES]; int vary_hull = 0; Index: defwin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defwin.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- defwin.c 8 Jun 2009 22:55:03 -0000 1.8 +++ defwin.c 9 Jun 2009 01:23:01 -0000 1.9 @@ -347,7 +347,6 @@ ,} ,} , -#ifdef VSHIELD_BITMAPS { "varyShields", BOOL_DEF, "Vary shields based on damage", &varyShields, @@ -357,7 +356,6 @@ ,} ,} , -#endif { "warnShields", BOOL_DEF, "Shield color based on alert status", &warnShields, Index: option.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/option.c,v retrieving revision 1.62 retrieving revision 1.63 diff -u -d -r1.62 -r1.63 --- option.c 9 Jun 2009 00:28:10 -0000 1.62 +++ option.c 9 Jun 2009 01:23:01 -0000 1.63 @@ -274,10 +274,8 @@ {1, "Page %d (click to change)", &MenuPage, 0, 0, 0, NULL, &Menus_Range}, {1, "", &colorClient, 0, 0, 0, bitmaptypemess, &bitmap_range}, {1, "draw ships to 256 positions", &fullBitmapRotation, 0, 0, 0, NULL, NULL}, -#ifdef VSHIELD_BITMAPS {1, "vary shields bitmap w/ dam", &varyShields, 0, 0, 0, NULL, NULL}, {1, "vary shields color w/ dam", &varyShieldsColor, 0, 0, 0, NULL, NULL}, -#endif {1, "use warning shields", &warnShields, 0, 0, 0, NULL, NULL}, {1, "use warning hull", &vary_hull, 0, 0, 0, NULL, NULL}, {1, "show my speed on local", &showMySpeed, 0, 0, 0, NULL, NULL}, From modemhero at users.sourceforge.net Mon Jun 8 20:23:03 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 09 Jun 2009 01:23:03 +0000 Subject: [netrek-cvs] client/netrekxp/include data.h, 1.118, 1.119 oldbitmaps.h, 1.1.1.1, 1.2 Message-ID: Update of /cvsroot/netrek/client/netrekxp/include In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28198/include Modified Files: data.h oldbitmaps.h Log Message: Remove VSHIELD_BITMAPS define. Index: data.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v retrieving revision 1.118 retrieving revision 1.119 diff -u -d -r1.118 -r1.119 --- data.h 9 Jun 2009 01:04:33 -0000 1.118 +++ data.h 9 Jun 2009 01:23:01 -0000 1.119 @@ -317,18 +317,12 @@ extern W_Icon etorp, mtorp; extern W_Icon eplasmatorp, mplasmatorp; -#ifdef VSHIELD_BITMAPS #define SHIELD_FRAMES 5 extern W_Icon base_vshield; extern W_Icon shield[SHIELD_FRAMES], cloakicon; extern int varyShields; extern int varyShieldsColor; -#else -extern W_Icon shield, cloakicon; - -#endif - extern W_Icon base_hull; extern W_Icon hull[BMP_HULL_FRAMES]; extern int vary_hull; Index: oldbitmaps.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/oldbitmaps.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- oldbitmaps.h 21 Jan 2003 21:27:54 -0000 1.1.1.1 +++ oldbitmaps.h 9 Jun 2009 01:23:01 -0000 1.2 @@ -1,4 +1,3 @@ -#ifdef VSHIELD_BITMAPS #define shield_width 20 #define shield_height 20 #define SHIELD_FRAMES 5 @@ -37,17 +36,6 @@ 0x0c, 0x00, 0x03, 0x18, 0x80, 0x01, 0x70, 0xe0, 0x00, 0xc0, 0x3f, 0x00}, }; -#else -static char shield_bits[] = { - 0xc0, 0x3f, 0x00, 0x30, 0xc0, 0x00, 0x08, 0x00, 0x01, 0x04, 0x00, 0x02, - 0x02, 0x00, 0x04, 0x02, 0x00, 0x04, 0x01, 0x00, 0x08, 0x01, 0x00, 0x08, - 0x01, 0x00, 0x08, 0x01, 0x00, 0x08, 0x01, 0x00, 0x08, 0x01, 0x00, 0x08, - 0x01, 0x00, 0x08, 0x01, 0x00, 0x08, 0x02, 0x00, 0x04, 0x02, 0x00, 0x04, - 0x04, 0x00, 0x02, 0x08, 0x00, 0x01, 0x30, 0xc0, 0x00, 0xc0, 0x3f, 0x00 -}; - -#endif - static char cloak_bits[] = { 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x10, 0x40, 0x00, 0x08, 0x82, 0x00, From modemhero at users.sourceforge.net Mon Jun 8 20:33:58 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 09 Jun 2009 01:33:58 +0000 Subject: [netrek-cvs] client/netrekxp/resources/netrekrc netrekrc.txt, 1.16, 1.17 Message-ID: Update of /cvsroot/netrek/client/netrekxp/resources/netrekrc In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29579 Modified Files: netrekrc.txt Log Message: Remove NEWMACRO and SMARTMACRO defines. They really didn't do anything. Almost all the code was outside the defines, and it's related to an ancient feature packet negotiation that doesn't exist anymore. Index: netrekrc.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/netrekrc/netrekrc.txt,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- netrekrc.txt 9 Jun 2009 01:04:39 -0000 1.16 +++ netrekrc.txt 9 Jun 2009 01:33:56 -0000 1.17 @@ -803,7 +803,7 @@ # %m the last message you sent # %M the last message you sent in all caps # -# As a further extension to NEWMACRO, a macro may now be sent to any of the following destinations: +# As a further extension, a macro may now be sent to any of the following destinations: # %i %I %c send message to self # %u %U %p send message to player nearest mouse # %t %z %Z send message to team of player nearest mouse From modemhero at users.sourceforge.net Mon Jun 8 20:33:52 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 09 Jun 2009 01:33:52 +0000 Subject: [netrek-cvs] client/netrekxp/win32 config.h,1.29,1.30 Message-ID: Update of /cvsroot/netrek/client/netrekxp/win32 In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29533/win32 Modified Files: config.h Log Message: Remove NEWMACRO and SMARTMACRO defines. They really didn't do anything. Almost all the code was outside the defines, and it's related to an ancient feature packet negotiation that doesn't exist anymore. Index: config.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/win32/config.h,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- config.h 9 Jun 2009 01:23:01 -0000 1.29 +++ config.h 9 Jun 2009 01:33:50 -0000 1.30 @@ -46,12 +46,6 @@ /* PACKET_LOG - log packets to stdout (for bandwith measurement) */ #define PACKET_LOG -/* NEWMACRO - newmacro language */ -#define NEWMACRO - -/* SMARTMACRO - macro extension (needs NEWMACRO) */ -#define SMARTMACRO - /* MULTILINE_MACROS - enables multiline macros */ #define MULTILINE_MACROS From modemhero at users.sourceforge.net Mon Jun 8 20:33:51 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 09 Jun 2009 01:33:51 +0000 Subject: [netrek-cvs] client/netrekxp/include data.h,1.119,1.120 Message-ID: Update of /cvsroot/netrek/client/netrekxp/include In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29533/include Modified Files: data.h Log Message: Remove NEWMACRO and SMARTMACRO defines. They really didn't do anything. Almost all the code was outside the defines, and it's related to an ancient feature packet negotiation that doesn't exist anymore. Index: data.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v retrieving revision 1.119 retrieving revision 1.120 diff -u -d -r1.119 -r1.120 --- data.h 9 Jun 2009 01:23:01 -0000 1.119 +++ data.h 9 Jun 2009 01:33:49 -0000 1.120 @@ -416,7 +416,6 @@ shipCol[5], rColor, yColor, gColor, unColor, foreColor; extern char *colornames[COLORS]; -/* jn - SMARTMACRO */ extern char lastMessage[]; extern int MacroNum; extern char teamlet[]; From modemhero at users.sourceforge.net Mon Jun 8 20:33:52 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 09 Jun 2009 01:33:52 +0000 Subject: [netrek-cvs] client/netrekxp/src data.c, 1.131, 1.132 defaults.c, 1.105, 1.106 macrowin.c, 1.3, 1.4 smessage.c, 1.10, 1.11 Message-ID: Update of /cvsroot/netrek/client/netrekxp/src In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29533/src Modified Files: data.c defaults.c macrowin.c smessage.c Log Message: Remove NEWMACRO and SMARTMACRO defines. They really didn't do anything. Almost all the code was outside the defines, and it's related to an ancient feature packet negotiation that doesn't exist anymore. Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.131 retrieving revision 1.132 diff -u -d -r1.131 -r1.132 --- data.c 9 Jun 2009 01:23:01 -0000 1.131 +++ data.c 9 Jun 2009 01:33:49 -0000 1.132 @@ -420,12 +420,7 @@ W_Icon paradise_bplanets[PARADISE_PLANET_VIEWS]; W_Icon paradise_bmplanets[PARADISE_PLANET_VIEWS]; -/* jn - SMARTMACRO */ - -#ifdef NEWMACRO int MacroNum = 0; - -#endif /* NEWMACRO */ char lastMessage[80]; char teamlet[] = { 'I', 'F', 'R', 'X', 'K', 'X', 'X', 'X', 'O', 'X', 'X', 'X', 'X', 'X', 'X', 'A' Index: smessage.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/smessage.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- smessage.c 16 Apr 2008 00:08:22 -0000 1.10 +++ smessage.c 9 Jun 2009 01:33:49 -0000 1.11 @@ -651,7 +651,7 @@ #endif -/* Used in NEWMACRO, useful elsewhere also */ +/* Used in newmacro, useful elsewhere also */ int getgroup (char addr, int *recip) Index: macrowin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/macrowin.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- macrowin.c 6 Apr 2007 06:46:32 -0000 1.3 +++ macrowin.c 9 Jun 2009 01:33:49 -0000 1.4 @@ -264,13 +264,9 @@ strcat (macromessage, " SHELL "); break; #endif - -#ifdef NEWMACRO case '\0': strcat (macromessage, " SPEC "); break; -#endif - default: strcat (macromessage, " ---- "); break; Index: defaults.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v retrieving revision 1.105 retrieving revision 1.106 diff -u -d -r1.105 -r1.106 --- defaults.c 9 Jun 2009 01:23:01 -0000 1.105 +++ defaults.c 9 Jun 2009 01:33:49 -0000 1.106 @@ -2975,7 +2975,7 @@ fputs ("# %m the last message you sent\n", fp); fputs ("# %M the last message you sent in all caps\n", fp); fputs ("#\n", fp); - fputs ("# As a further extension to NEWMACRO, a macro may now be sent to any of the following destinations:\n", fp); + fputs ("# As a further extension, a macro may now be sent to any of the following destinations:\n", fp); fputs ("# %i %I %c send message to self\n", fp); fputs ("# %u %U %p send message to player nearest mouse\n", fp); fputs ("# %t %z %Z send message to team of player nearest mouse\n", fp); From modemhero at users.sourceforge.net Mon Jun 8 20:50:39 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 09 Jun 2009 01:50:39 +0000 Subject: [netrek-cvs] client/netrekxp/include proto.h,1.70,1.71 Message-ID: Update of /cvsroot/netrek/client/netrekxp/include In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv31550/include Modified Files: proto.h Log Message: Remove CheckFeatures() - deprecated version of modern feature packets, no longer used by servers. Index: proto.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/proto.h,v retrieving revision 1.70 retrieving revision 1.71 diff -u -d -r1.70 -r1.71 --- proto.h 9 Jun 2009 01:04:33 -0000 1.70 +++ proto.h 9 Jun 2009 01:50:37 -0000 1.71 @@ -150,7 +150,6 @@ unsigned char to); int instr (char *string1, char *string2); -// static void CheckFeatures(char *m); void sendVersion (void); #ifdef CLUECHECKBORG void ClueRespond (char *message); From modemhero at users.sourceforge.net Mon Jun 8 20:50:39 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 09 Jun 2009 01:50:39 +0000 Subject: [netrek-cvs] client/netrekxp/src dmessage.c,1.13,1.14 Message-ID: Update of /cvsroot/netrek/client/netrekxp/src In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv31550/src Modified Files: dmessage.c Log Message: Remove CheckFeatures() - deprecated version of modern feature packets, no longer used by servers. Index: dmessage.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/dmessage.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- dmessage.c 6 May 2009 07:46:07 -0000 1.13 +++ dmessage.c 9 Jun 2009 01:50:37 -0000 1.14 @@ -25,91 +25,6 @@ static int version_sent = 0; /******************************************************************************/ -/*** CheckFeatures() ***/ -/******************************************************************************/ -static void -CheckFeatures (char *m) -{ - char buf[BUFSIZ]; - char *pek = &m[10]; - - if (strlen (m) < 11) - return; - - while ((*pek == ' ') && (*pek != '\0')) - pek++; - - STRNCPY (buf, "COW: ", 6); - - if (!strcmp (pek, "NO_NEWMACRO")) - { - UseNewMacro = 0; - strcat (buf, pek); - } - - if (!strcmp (pek, "NO_SMARTMACRO")) - { - UseSmartMacro = 0; - strcat (buf, pek); - } - - if (!strcmp (pek, "WHY_DEAD")) - { - why_dead = 1; - strcat (buf, pek); - } - - if (!strcmp (pek, "RC_DISTRESS")) - { - gen_distress = 1; - distmacro = dist_prefered; - strcat (buf, pek); - } - -#ifdef MOTION_MOUSE - if (!strcmp (pek, "NO_CONTINUOUS_MOUSE")) - { - motion_mouse_enablable = 0; - strcat (buf, pek); - } -#endif - -#ifdef MULTILINE_MACROS - if (!strcmp (pek, "MULTIMACROS")) - { - multiline_enabled = 1; - strcat (buf, pek); - } -#endif - - if (!strcmp (pek, "SBHOURS")) - { - SBhours = 1; - strcat (buf, pek); - } - - /* Client spezific notes sent by the server */ - if (!strncmp (pek, "INFO", 4)) - { - strcat (buf, pek); - } - - if (strlen (buf) == 5) - { - strcat (buf, "UNKNOWN FEATURE: "); - strcat (buf, pek); - } - - buf[79] = '\0'; - -#ifdef TOOLS - W_WriteText (toolsWin, 0, 0, textColor, buf, strlen (buf), W_RegularFont); -#else - W_MessageAllowedWindows (WAM_INDIV, 0, 0, W_White, buf, strlen (buf), 0); -#endif -} - -/******************************************************************************/ /*** dmessage() ***/ /******************************************************************************/ void @@ -192,12 +107,6 @@ LineToConsole ("You should probably pester the server god to update....\n"); } } - if (flags == (MCONFIG + MINDIV + MVALID)) - { - if (from == 255) - CheckFeatures (message); - return; - } if ((flags == team) || (flags == take) || (flags == destroy)) { W_MessageAllowedWindows (WAM_TEAM, 0, 0, color, message, len, shipFont (me)); From modemhero at users.sourceforge.net Mon Jun 8 21:09:47 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 09 Jun 2009 02:09:47 +0000 Subject: [netrek-cvs] client/netrekxp/win32 config.h,1.30,1.31 Message-ID: Update of /cvsroot/netrek/client/netrekxp/win32 In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv2260/win32 Modified Files: config.h Log Message: Removed DIST_KEY_NAME define, this allows distress macros to be remapped to different keys. Unnecessary to use a define for this default behavior. Index: config.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/win32/config.h,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- config.h 9 Jun 2009 01:33:50 -0000 1.30 +++ config.h 9 Jun 2009 02:09:45 -0000 1.31 @@ -83,7 +83,6 @@ #define MOUSE_AS_SHIFT #define SHIFTED_MOUSE #define MOTION_MOUSE -#define DIST_KEY_NAME #define XTRA_MESSAGE_UI #define PHASER_STATS From modemhero at users.sourceforge.net Mon Jun 8 21:09:47 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 09 Jun 2009 02:09:47 +0000 Subject: [netrek-cvs] client/netrekxp/src defaults.c, 1.106, 1.107 input.c, 1.55, 1.56 Message-ID: Update of /cvsroot/netrek/client/netrekxp/src In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv2260/src Modified Files: defaults.c input.c Log Message: Removed DIST_KEY_NAME define, this allows distress macros to be remapped to different keys. Unnecessary to use a define for this default behavior. Index: input.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/input.c,v retrieving revision 1.55 retrieving revision 1.56 diff -u -d -r1.55 -r1.56 --- input.c 9 Jun 2009 00:16:36 -0000 1.55 +++ input.c 9 Jun 2009 02:09:45 -0000 1.56 @@ -2232,8 +2232,6 @@ if (found) return; - -#ifdef DIST_KEY_NAME /* scan for distress call here */ for (i = take; distmacro[i].name; i++) @@ -2245,9 +2243,6 @@ } } -#endif - - warning ("Unknown macro"); W_Beep (); } Index: defaults.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v retrieving revision 1.106 retrieving revision 1.107 diff -u -d -r1.106 -r1.107 --- defaults.c 9 Jun 2009 01:33:49 -0000 1.106 +++ defaults.c 9 Jun 2009 02:09:45 -0000 1.107 @@ -1282,13 +1282,11 @@ { dm->macro = strdup (v); -#ifdef DIST_KEY_NAME if (c) { dm->c = c; dm_def->c = c; } -#endif /* DIST_KEY_NAME */ notdone = 0; } From modemhero at users.sourceforge.net Mon Jun 8 21:23:02 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 09 Jun 2009 02:23:02 +0000 Subject: [netrek-cvs] client/netrekxp/src cowmain.c, 1.42, 1.43 data.c, 1.132, 1.133 input.c, 1.56, 1.57 interface.c, 1.3, 1.4 playback.c, 1.29, 1.30 redraw.c, 1.16, 1.17 Message-ID: Update of /cvsroot/netrek/client/netrekxp/src In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv4193/src Modified Files: cowmain.c data.c input.c interface.c playback.c redraw.c Log Message: Remove BRMH define. Removed alternate input loop that is never used. Index: redraw.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/redraw.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- redraw.c 19 Apr 2008 16:23:00 -0000 1.16 +++ redraw.c 9 Jun 2009 02:23:00 -0000 1.17 @@ -33,13 +33,9 @@ static int needredraw = 0; static unsigned long lastredraw = 0; -#ifdef BRMH void intrupt (fd_set * readfds) -#else -void -intrupt (void) -#endif + { time_t time (time_t *); unsigned long t; @@ -53,11 +49,7 @@ #endif needredraw |= -#ifdef BRMH readFromServer (readfds); -#else - readFromServer (); -#endif t = msetime (); if (needredraw && (t >= lastredraw + redrawDelay * 100)) Index: input.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/input.c,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- input.c 9 Jun 2009 02:09:45 -0000 1.56 +++ input.c 9 Jun 2009 02:23:00 -0000 1.57 @@ -758,7 +758,6 @@ detallow = 1; } -#ifdef BRMH #ifdef THREADED /******************************************************************************/ /*** input() ***/ @@ -1024,255 +1023,6 @@ return loop; } -#else -/******************************************************************************/ -/*** input() - non BRMH version? ***/ -/******************************************************************************/ -input () -{ - W_Event data; - W_Callback handler; - fd_set readfds; - struct timeval timeout; - -#ifdef AUTOKEY - timeout.tv_sec = 0; - timeout.tv_usec = 100000; -#endif /* AUTOKEY */ - - while (1) - { - while (!W_EventsPending ()) - { - if (keepInfo > 0 && opened_info != -2 && /* 6/1/93 LAB */ - opened_info < 0 && infomapped) - destroyInfo (); - if (keepInfo > 0 && opened_info != -2) - opened_info--; - - FD_ZERO (&readfds); - FD_SET (W_Socket (), &readfds); - FD_SET (sock, &readfds); - if (udpSock >= 0) - FD_SET (udpSock, &readfds); - -#ifdef AUTOKEY - if (autoKey) - { - doAutoKey (); - if (select (32, &readfds, 0, 0, &timeout) == 0) /* timeout */ - continue; - } - else - select (32, &readfds, 0, 0, 0); -#else - select (32, &readfds, 0, 0, 0); -#endif - - if (FD_ISSET (sock, &readfds) || - (udpSock >= 0 && FD_ISSET (udpSock, &readfds))) - { - intrupt (); - if (isServerDead ()) - { - LineToConsole ("Shit, We've been ghostbusted\n"); - LineToConsole ("hope you're not in a base\n"); - /* UDP fail-safe */ - commMode = commModeReq = COMM_TCP; - commSwitchTimeout = 0; - if (udpSock >= 0) - closeUdpConn (); - if (udpWin) - { - udprefresh (UDP_CURRENT); - udprefresh (UDP_STATUS); - } - connectToServer (nextSocket); - LineToConsole ("We've been resurrected!\n"); - map (); - } - } - if (FD_ISSET (W_Socket (), &readfds)) - continue; /* we're forced to call - * W_EventsPending at the - * top */ - } - W_NextEvent (&data); - switch ((int) data.type) - { - -#ifdef MOUSE_AS_SHIFT - case W_EV_MKEY: - if ((handler = W_GetWindowKeyDownHandler (data.Window)) != NULL) - (*handler) (&data); - else if (messageon) - smessage (data.key); - else if (mouseAsShift) - mkeyaction (&data); - else - keyaction (&data); - break; -#endif - - case W_EV_KEY: - -#ifdef DEBUG - LineToConsole ("W_EV_KEY\n"); -#endif - - if ((handler = W_GetWindowKeyDownHandler (data.Window)) != NULL) - (*handler) (&data); - -#ifdef DOC_WIN - else if (data.Window == docwin) - switch (data.key) - { - case 'f': - docline += 28; - - if (docline >= maxdoclines) - docline = maxdoclines - 28; - - showdocs (docline); - break; - case 'b': - docline -= 28; - - if (docline < 0) - docline = 0; - - showdocs (docline); - break; - case 'F': - docline += 4; - - if (docline >= maxdoclines) - docline = maxdoclines - 28; - - showdocs (docline); - break; - case 'B': - docline -= 4; - - if (docline < 0) - docline = 0; - - showdocs (docline); - break; - default: - data.Window = w; - keyaction (&data); - break; - } - else if (data.Window == xtrekrcwin) - switch (data.key) - { - case 'f': - xtrekrcline += 28; - - if (xtrekrcline >= maxxtrekrclines) - xtrekrcline = maxxtrekrclines - 28; - - showxtrekrc (xtrekrcline); - break; - case 'b': - xtrekrcline -= 28; - - if (xtrekrcline < 0) - xtrekrcline = 0; - - showxtrekrc (xtrekrcline); - break; - case 'F': - xtrekrcline += 4; - - if (xtrekrcline >= maxxtrekrclines) - xtrekrcline = maxxtrekrclines - 28; - - showxtrekrc (xtrekrcline); - break; - case 'B': - xtrekrcline -= 4; - - if (xtrekrcline < 0) - xtrekrcline = 0; - - showxtrekrc (xtrekrcline); - break; - default: - data.Window = w; - keyaction (&data); - break; - } -#endif - - else if (messageon) - smessage (data.key); - else - keyaction (&data); - break; - -#ifdef AUTOKEY - case W_EV_KEY_OFF: - -#ifdef DEBUG - LineToConsole ("W_EV_KEY_OFF\n"); -#endif - - if ((handler = W_GetWindowKeyUpHandler (data.Window)) != NULL) - (*handler) (&data); - if (autoKey) - autoKeyOff (&data); - break; -#endif /* AUTOKEY */ - - case W_EV_BUTTON: - -#ifdef DEBUG - LineToConsole ("W_EV_BUTTON\n"); -#endif - - if ((handler = W_GetWindowButtonHandler (data.Window)) != NULL) - (*handler) (&data); - else - buttonaction (&data); - break; - - case W_EV_EXPOSE: - -#ifdef DEBUG - LineToConsole ("W_EV_EXPOSE\n"); -#endif - - if ((handler = W_GetWindowExposeHandler (data.Window)) != NULL) - (*handler) (&data); - else if (data.Window == mapw) - redrawall = 1; - else if (data.Window == warnw) - W_ClearWindow (warnw); - else if (data.Window == messagew) - W_ClearWindow (messagew); - -#ifdef XTREKRC_HELP - else if (defWin && (data.Window == defWin)) - showdef (); -#endif - -#ifdef DOC_WIN - else if (docwin && (data.Window == docwin)) - showdocs (docline); - else if (xtrekrcwin && (data.Window == xtrekrcwin)) - showxtrekrc (xtrekrcline); -#endif - - break; - default: - break; - } - } -} - -#endif /******************************************************************************/ /*** keyaction() ***/ Index: playback.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/playback.c,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- playback.c 6 Mar 2009 04:09:27 -0000 1.29 +++ playback.c 9 Jun 2009 02:23:00 -0000 1.30 @@ -321,11 +321,7 @@ /* End entrywindow() */ //#endif -#ifdef BRMH redrawall = 2; -#else - redrawall = 1; -#endif myship = getship (myship->s_type); enter (); @@ -362,13 +358,12 @@ while (1) { -#ifdef BRMH fd_set readfds; struct timeval timeout; timeout.tv_sec = 0; timeout.tv_usec = 0; -#endif + if (keepInfo > 0 && opened_info != -2 && /* 6/1/93 LAB */ opened_info < 0 && infomapped) destroyInfo (); @@ -379,11 +374,8 @@ process_event (); } -#ifdef BRMH intrupt (&readfds); -#else - intrupt (); -#endif + Sleep (pbdelay); } } Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.132 retrieving revision 1.133 diff -u -d -r1.132 -r1.133 --- data.c 9 Jun 2009 01:33:49 -0000 1.132 +++ data.c 9 Jun 2009 02:23:00 -0000 1.133 @@ -667,11 +667,8 @@ #endif -#ifdef BRMH int max_fd = 3; -#endif - #ifdef TOOLS W_Window toolsWin = NULL; int shellTools = 1; Index: cowmain.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/cowmain.c,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- cowmain.c 8 Jun 2009 22:55:03 -0000 1.42 +++ cowmain.c 9 Jun 2009 02:23:00 -0000 1.43 @@ -1002,11 +1002,7 @@ myship = getship(myship->s_type); currentship = myship->s_type; -#ifdef BRMH redrawall = 2; -#else - redrawall = 1; -#endif enter (); calibrate_stats (); Index: interface.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/interface.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- interface.c 15 Mar 2007 20:49:34 -0000 1.3 +++ interface.c 9 Jun 2009 02:23:00 -0000 1.4 @@ -229,8 +229,6 @@ { char timebuf[9]; struct tm *tm; - -#ifdef BRMH static time_t tt; if ((curtime - tt) < 1) @@ -245,9 +243,6 @@ timebuf[5] = ':'; timebuf[6] = (char) (tm->tm_sec / 10 + '0'); timebuf[7] = (char) ((tm->tm_sec % 10) + '0'); -#else - sprintf (timebuf, "%02d:%02d:%02d", tm->tm_hour, tm->tm_min, tm->tm_sec); -#endif tm = NULL; From modemhero at users.sourceforge.net Mon Jun 8 21:23:02 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 09 Jun 2009 02:23:02 +0000 Subject: [netrek-cvs] client/netrekxp/include data.h, 1.120, 1.121 proto.h, 1.71, 1.72 Message-ID: Update of /cvsroot/netrek/client/netrekxp/include In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv4193/include Modified Files: data.h proto.h Log Message: Remove BRMH define. Removed alternate input loop that is never used. Index: data.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v retrieving revision 1.120 retrieving revision 1.121 diff -u -d -r1.120 -r1.121 --- data.h 9 Jun 2009 01:33:49 -0000 1.120 +++ data.h 9 Jun 2009 02:23:00 -0000 1.121 @@ -573,11 +573,8 @@ #endif -#ifdef BRMH extern int max_fd; -#endif - #ifdef TOOLS extern W_Window toolsWin; extern int shellTools; Index: proto.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/proto.h,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- proto.h 9 Jun 2009 01:50:37 -0000 1.71 +++ proto.h 9 Jun 2009 02:23:00 -0000 1.72 @@ -944,11 +944,7 @@ /******************************************************************************/ /*** redraw.c /******************************************************************************/ -#ifdef BRMH void intrupt (fd_set * readfds); -#else -void intrupt (void); -#endif void redraw (void); void stline (int flag); void redrawTstats (void); From modemhero at users.sourceforge.net Mon Jun 8 21:23:02 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 09 Jun 2009 02:23:02 +0000 Subject: [netrek-cvs] client/netrekxp/win32 config.h,1.31,1.32 Message-ID: Update of /cvsroot/netrek/client/netrekxp/win32 In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv4193/win32 Modified Files: config.h Log Message: Remove BRMH define. Removed alternate input loop that is never used. Index: config.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/win32/config.h,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- config.h 9 Jun 2009 02:09:45 -0000 1.31 +++ config.h 9 Jun 2009 02:23:00 -0000 1.32 @@ -75,7 +75,6 @@ #define PLIST1 #define PLIST -#define BRMH #define DOC_WIN #define ROTATERACE From quozl at users.sourceforge.net Tue Jun 9 03:19:46 2009 From: quozl at users.sourceforge.net (James Cameron) Date: Tue, 09 Jun 2009 08:19:46 +0000 Subject: [netrek-cvs] client/netrekxp/src newwin.c,1.81,1.82 Message-ID: Update of /cvsroot/netrek/client/netrekxp/src In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10260 Modified Files: newwin.c Log Message: fix bug in clear motd sequence Index: newwin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/newwin.c,v retrieving revision 1.81 retrieving revision 1.82 diff -u -d -r1.81 -r1.82 --- newwin.c 9 Jun 2009 01:23:01 -0000 1.81 +++ newwin.c 9 Jun 2009 08:19:43 -0000 1.82 @@ -2304,7 +2304,7 @@ newMotdStuff = 1; /* set flag for event loop */ first = 1; /* check for bold again */ } - + if (!statmode && !strcmp (line, STATUS_TOKEN)) statmode = 1; if (!statmode) @@ -2321,6 +2321,8 @@ if (strcmp (line, MOTDCLEARLINE) == 0) { ClearMotd (); + motddata = NULL; + temp = &motddata; return; } From quozl at users.sourceforge.net Tue Jun 9 06:10:35 2009 From: quozl at users.sourceforge.net (James Cameron) Date: Tue, 09 Jun 2009 11:10:35 +0000 Subject: [netrek-cvs] client/netrekxp/src newwin.c,1.82,1.83 Message-ID: Update of /cvsroot/netrek/client/netrekxp/src In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29763 Modified Files: newwin.c Log Message: fix more bug in clear motd sequence Index: newwin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/newwin.c,v retrieving revision 1.82 retrieving revision 1.83 diff -u -d -r1.82 -r1.83 --- newwin.c 9 Jun 2009 08:19:43 -0000 1.82 +++ newwin.c 9 Jun 2009 11:10:33 -0000 1.83 @@ -2320,9 +2320,12 @@ /* Motd clearing code */ if (strcmp (line, MOTDCLEARLINE) == 0) { + free(*temp); ClearMotd (); motddata = NULL; temp = &motddata; + MaxMotdLine = 0; + statmode = 0; return; } From modemhero at users.sourceforge.net Tue Jun 9 20:24:04 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 10 Jun 2009 01:24:04 +0000 Subject: [netrek-cvs] client/netrekxp/include proto.h,1.72,1.73 Message-ID: Update of /cvsroot/netrek/client/netrekxp/include In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv20622/include Modified Files: proto.h Log Message: Clean up MOTD code as per changes to COW. Update some macros to 2010 version. Readd ignore on dmessage with flags MCONFIG|MINDIV| MVALID. Was causing version messages being sent to self on personal board. Fix scaling issue with "seconds to go" during initial login with resized tactical window. Bug fix for paradise refitstring, now drawn only when drawing sysdef and not whenever any motd is drawn. Showvalues() - split display between paradise and non-paradise servers. Since paradise values can be numerous, and could overflow the previous 34 line limit, we now use the empty space on top of map window, giving 50 lines to work with. Added missing free pics to ClearMotd. Fixed some indentation. Known issue: bold doesn't work on MOTD for player name Index: proto.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/proto.h,v retrieving revision 1.72 retrieving revision 1.73 diff -u -d -r1.72 -r1.73 --- proto.h 9 Jun 2009 02:23:00 -0000 1.72 +++ proto.h 10 Jun 2009 01:24:02 -0000 1.73 @@ -824,7 +824,7 @@ void ClearMotd (void); void showMotdWin (W_Window motdwin, int atline); struct list; -void showValues (struct list *data); +void showValues (struct motd_line *data); void newMotdLine (char *line); void newMotdPic (int x, int y, int width, int height, char *bits, int page); void getResources (char *prog); From modemhero at users.sourceforge.net Tue Jun 9 20:24:15 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 10 Jun 2009 01:24:15 +0000 Subject: [netrek-cvs] client/netrekxp/resources/netrekrc netrekrc.txt, 1.17, 1.18 Message-ID: Update of /cvsroot/netrek/client/netrekxp/resources/netrekrc In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv20688 Modified Files: netrekrc.txt Log Message: Clean up MOTD code as per changes to COW. Update some macros to 2010 version. Readd ignore on dmessage with flags MCONFIG|MINDIV| MVALID. Was causing version messages being sent to self on personal board. Fix scaling issue with "seconds to go" during initial login with resized tactical window. Bug fix for paradise refitstring, now drawn only when drawing sysdef and not whenever any motd is drawn. Showvalues() - split display between paradise and non-paradise servers. Since paradise values can be numerous, and could overflow the previous 34 line limit, we now use the empty space on top of map window, giving 50 lines to work with. Added missing free pics to ClearMotd. Fixed some indentation. Known issue: bold doesn't work on MOTD for player name Index: netrekrc.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/netrekrc/netrekrc.txt,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- netrekrc.txt 9 Jun 2009 01:33:56 -0000 1.17 +++ netrekrc.txt 10 Jun 2009 01:24:13 -0000 1.18 @@ -881,10 +881,10 @@ # Keys that will trigger macro without going to macro mode singleMacro: EF -macro.0.A:% __ __ ______ __ Zoom in/out! Anti-packet loss, -macro.0.A:% / \ / /__/_ __/______ / /__ observers see all weapons, etc. -macro.0.A:% / /\ \/ / -_)/ / / __/ -_) '_/ Plus 50 updates/sec support! -macro.0.A:% /_/ \__/\__//_/ /_/ \__/_/\_\ XP 2009, v1.1 +macro.0.A:% __ __ ______ __ Lots of bug fixes! +macro.0.A:% / \ / /__/_ __/______ / /__ Support new server features! +macro.0.A:% / /\ \/ / -_)/ / / __/ -_) '_/ Paradise/sturgeon ready! +macro.0.A:% /_/ \__/\__//_/ /_/ \__/_/\_\ XP 2010, v1.0 macro.0.A:% Get it today at http://play.netrek.org macro.P.A:% \~~\ _ _ ,----------------------------------, @@ -1049,9 +1049,9 @@ macro.).A:/* http://groups.google.com/group/netrek-clue-games */ macro.).A:/* INL-style timed bronco games are every Wednesday! */ -macro.(.A:/* Get the latest version of Netrek XP 2009 today! */ -macro.(.A:/* Current version is 1.1 */ -macro.(.A:/* Download it at http://www.netrek.org/files/NetrekXP_2009/ */ +macro.(.A:/* Get the latest version of Netrek XP 2010 today! */ +macro.(.A:/* Current version is 1.0 */ +macro.(.A:/* Download it at http://www.netrek.org/files/NetrekXP_2010/ */ macro.(.A:/* or at http://play.netrek.org */ mac.e.T: Escorting %g (%d%%D %s%%S %f%%F) From modemhero at users.sourceforge.net Tue Jun 9 20:24:04 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 10 Jun 2009 01:24:04 +0000 Subject: [netrek-cvs] client/netrekxp/src dmessage.c, 1.14, 1.15 getname.c, 1.13, 1.14 newwin.c, 1.83, 1.84 Message-ID: Update of /cvsroot/netrek/client/netrekxp/src In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv20622/src Modified Files: dmessage.c getname.c newwin.c Log Message: Clean up MOTD code as per changes to COW. Update some macros to 2010 version. Readd ignore on dmessage with flags MCONFIG|MINDIV| MVALID. Was causing version messages being sent to self on personal board. Fix scaling issue with "seconds to go" during initial login with resized tactical window. Bug fix for paradise refitstring, now drawn only when drawing sysdef and not whenever any motd is drawn. Showvalues() - split display between paradise and non-paradise servers. Since paradise values can be numerous, and could overflow the previous 34 line limit, we now use the empty space on top of map window, giving 50 lines to work with. Added missing free pics to ClearMotd. Fixed some indentation. Known issue: bold doesn't work on MOTD for player name Index: newwin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/newwin.c,v retrieving revision 1.83 retrieving revision 1.84 diff -u -d -r1.83 -r1.84 --- newwin.c 9 Jun 2009 11:10:33 -0000 1.83 +++ newwin.c 10 Jun 2009 01:24:02 -0000 1.84 @@ -2076,14 +2076,15 @@ return (1); } -struct list +/* forward linked list of received motd lines */ +struct motd_line { - char bold; - struct list *next; + struct motd_line *next; char *data; + char bold; }; -static struct list *motddata = NULL; /* pointer to first bit of - * motddata */ +/* pointer to first item in the list */ +static struct motd_line *motd_lines = NULL; static int first = 1; @@ -2094,7 +2095,7 @@ showMotdWin (W_Window motdwin, int atline) { int i, length, top, center; - struct list *data; + struct motd_line *data; int count; char buf[128]; @@ -2121,7 +2122,7 @@ if (first) { first = 0; - data = motddata; + data = motd_lines; while (data != NULL) { data->bold = (char) (checkBold (data->data)); @@ -2129,13 +2130,13 @@ } } - data = motddata; + data = motd_lines; for (i = 0; i < atline; i++) { if (data == NULL) { atline = 0; - data = motddata; + data = motd_lines; break; } data = data->next; @@ -2166,13 +2167,7 @@ break; } if (paradise) - { - if (motdwin == w) { - W_WriteText(mapw, GWINSIDE/2 - W_Textwidth * strlen(blk_refitstring) / 2, GWINSIDE - 20, textColor, blk_refitstring, - strlen(blk_refitstring), W_RegularFont); - } showPics(motdwin, atline); - } showValues (data); } @@ -2214,7 +2209,7 @@ /*** ATM: show the current values of the .sysdef parameters. */ /******************************************************************************/ void -showValues (struct list *data) +showValues (struct motd_line *data) { int i; static char *msg = "OPTIONS SET WHEN YOU STARTED WERE:"; @@ -2230,45 +2225,74 @@ } data = data->next; - W_WriteText (mapw, 20, 14 * W_Textheight, textColor, msg, - strlen (msg), W_RegularFont); - - for (i = 16; i < 50; i++) + if (paradise) + /* Use the full window for paradise, and no header */ { - if (data == NULL) - break; - if (data->data[0] == '+') /* quick boldface hack */ - W_WriteText (mapw, 20, i * W_Textheight, textColor, - data->data + 1, strlen (data->data) - 1, W_BoldFont); - else - W_WriteText (mapw, 20, i * W_Textheight, textColor, data->data, - strlen (data->data), W_RegularFont); - data = data->next; - if (!paradise) // Extra line for non-paradise + for (i = 1; i < 50; i++) + { + if (data == NULL) + break; + if (data->data[0] == '+') /* quick boldface hack */ + W_WriteText (mapw, 20, i * W_Textheight, textColor, + data->data + 1, strlen (data->data) - 1, W_BoldFont); + else + W_WriteText (mapw, 20, i * W_Textheight, textColor, data->data, + strlen (data->data), W_RegularFont); + data = data->next; + } + W_WriteText(mapw, GWINSIDE/2 - W_Textwidth * strlen(blk_refitstring) / 2, GWINSIDE - 20, textColor, blk_refitstring, + strlen(blk_refitstring), W_RegularFont); + } + else + { + W_WriteText (mapw, 20, 14 * W_Textheight, textColor, msg, + strlen (msg), W_RegularFont); + + for (i = 16; i < 50; i++) + { + if (data == NULL) + break; + if (data->data[0] == '+') /* quick boldface hack */ + W_WriteText (mapw, 20, i * W_Textheight, textColor, + data->data + 1, strlen (data->data) - 1, W_BoldFont); + else + W_WriteText (mapw, 20, i * W_Textheight, textColor, data->data, + strlen (data->data), W_RegularFont); + data = data->next; i++; + } } } /******************************************************************************/ /*** ClearMotd() -/*** Free the current motdData +/*** Free the current motd_lines /******************************************************************************/ void ClearMotd (void) { - struct list *temp, *temp2; + struct motd_line *next, *this; + struct piclist *temppic; - temp = motddata; /* start of motd information */ - while (temp != NULL) + while (motdPics) { + temppic = motdPics; + motdPics = temppic->next; + if (temppic->thepic) + free(temppic->thepic); + free(temppic); + } + + next = motd_lines; /* start of motd information */ + while (next != NULL) { - temp2 = temp; - temp = temp->next; - free (temp2->data); - free (temp2); + this = next; + next = next->next; + free (this->data); + free (this); } - // Probably need some stuff here from erase_motd() - first = 1; /* so that it'll check bold - * next time around */ + /* check bold next time around */ + first = 1; + motd_lines = NULL; } /******************************************************************************/ @@ -2277,62 +2301,69 @@ void newMotdLine (char *line) { - static struct list **temp = &motddata; - static int statmode = 0; /* ATM */ + static struct motd_line *old = NULL; /* previous item allocated */ + static int statmode = 0; + struct motd_line *new; if (paradise) { - /* Inlined blk_parsemotd() paradise client function */ - if (strncmp("BLK: ", line, 5) == 0) { - /* See if it's a refit string.*/ - if (strncmp(&line[5], "REFIT", 5) == 0) { - strncpy(blk_refitstring, &line[10], 79); - blk_refitstring[79] = '\0'; - } - /* Check to see if it's a borgish feature being enabled. */ - else if (strncmp(&line[5], "BORGISH ", 8) == 0) { - if (strncmp(&line[13], "FRCLOAK", 7) == 0) - blk_friendlycloak = 1; + /* Inlined blk_parsemotd() paradise client function */ + if (strncmp("BLK: ", line, 5) == 0) { + /* See if it's a refit string.*/ + if (strncmp(&line[5], "REFIT", 5) == 0) { + strncpy(blk_refitstring, &line[10], 79); + blk_refitstring[79] = '\0'; + } + /* Check to see if it's a borgish feature being enabled. */ + else if (strncmp(&line[5], "BORGISH ", 8) == 0) { + if (strncmp(&line[13], "FRCLOAK", 7) == 0) + blk_friendlycloak = 1; + } + return; } - return; - } - if ( strncmp("\t@@b", line, 4) == 0) // Between pages - return; - /*if (!currpage || - (pagecount - 1) == currpage->page || - motdlinestate == IN_SYSDEF) */ - newMotdStuff = 1; /* set flag for event loop */ - first = 1; /* check for bold again */ + if ( strncmp("\t@@b", line, 4) == 0) // Between pages + return; + /*if (!currpage || + (pagecount - 1) == currpage->page || + motdlinestate == IN_SYSDEF) */ + newMotdStuff = 1; /* set flag for event loop */ + first = 1; /* check for bold again */ } - if (!statmode && !strcmp (line, STATUS_TOKEN)) - statmode = 1; - if (!statmode) - MaxMotdLine++; /* ATM - don't show on left */ - (*temp) = (struct list *) malloc (sizeof (struct list)); - - if ((*temp) == NULL) - { /* malloc error checking -- - * 10/30/92 EM */ - LineToConsole ("Warning: Couldn't malloc space for a new motd line!"); - return; - } /* Motd clearing code */ if (strcmp (line, MOTDCLEARLINE) == 0) { - free(*temp); + W_ClearWindow (w); ClearMotd (); - motddata = NULL; - temp = &motddata; MaxMotdLine = 0; statmode = 0; return; } + + if (!strcmp(line, STATUS_TOKEN)) + statmode = 1; - (*temp)->next = NULL; - (*temp)->data = malloc (strlen (line) + 1); - strcpy ((*temp)->data, line); - temp = &((*temp)->next); + new = (struct motd_line *) malloc(sizeof(struct motd_line)); + if (new == NULL) + return; + + if (!statmode) + MaxMotdLine++; + +#ifdef DEBUG + LineToConsole("%s\n", line); +#endif + /* add new line to tail of list */ + new->next = NULL; + new->bold = 0; + new->data = strdup(line); + if (motd_lines == NULL) + motd_lines = new; + else + old->next = new; + + old = new; + showMotdWin(w, 0); } /******************************************************************************/ Index: dmessage.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/dmessage.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- dmessage.c 9 Jun 2009 01:50:37 -0000 1.14 +++ dmessage.c 10 Jun 2009 01:24:02 -0000 1.15 @@ -107,6 +107,9 @@ LineToConsole ("You should probably pester the server god to update....\n"); } } + if (flags == (MCONFIG + MINDIV + MVALID)) + return; + if ((flags == team) || (flags == take) || (flags == destroy)) { W_MessageAllowedWindows (WAM_TEAM, 0, 0, color, message, len, shipFont (me)); Index: getname.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/getname.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- getname.c 6 Jun 2009 03:29:08 -0000 1.13 +++ getname.c 10 Jun 2009 01:24:02 -0000 1.14 @@ -474,7 +474,7 @@ secondsLeft--; showreadme (); sprintf (tempstr, "Seconds to go: %d ", secondsLeft); - W_WriteText (w, 150, 400, textColor, tempstr, + W_WriteText (w, 3 * TWINSIDE / 10, 4 * TWINSIDE / 5, textColor, tempstr, strlen (tempstr), W_BoldFont); if (secondsLeft == 0) { @@ -507,7 +507,7 @@ case W_EV_EXPOSE: displayStartup (defname); sprintf (tempstr, "Seconds to go: %d ", secondsLeft); - W_WriteText (w, 150, 400, textColor, tempstr, strlen (tempstr), + W_WriteText (w, 3 * TWINSIDE / 10, 4 * TWINSIDE / 5, textColor, tempstr, strlen (tempstr), W_BoldFont); break; case W_EV_KEY: From modemhero at users.sourceforge.net Tue Jun 9 21:48:21 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 10 Jun 2009 02:48:21 +0000 Subject: [netrek-cvs] client/netrekxp/src newwin.c,1.84,1.85 Message-ID: Update of /cvsroot/netrek/client/netrekxp/src In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv973 Modified Files: newwin.c Log Message: Fix bold with MOTD. Index: newwin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/newwin.c,v retrieving revision 1.84 retrieving revision 1.85 diff -u -d -r1.84 -r1.85 --- newwin.c 10 Jun 2009 01:24:02 -0000 1.84 +++ newwin.c 10 Jun 2009 02:48:19 -0000 1.85 @@ -2081,11 +2081,10 @@ { struct motd_line *next; char *data; - char bold; + int bold; }; /* pointer to first item in the list */ static struct motd_line *motd_lines = NULL; -static int first = 1; /******************************************************************************/ @@ -2119,15 +2118,13 @@ else top = 10; - if (first) + data = motd_lines; + + while (data != NULL) { - first = 0; - data = motd_lines; - while (data != NULL) - { - data->bold = (char) (checkBold (data->data)); - data = data->next; - } + if (data->bold == -1) + data->bold = checkBold(data->data); + data = data->next; } data = motd_lines; @@ -2289,9 +2286,6 @@ free (this->data); free (this); } - - /* check bold next time around */ - first = 1; motd_lines = NULL; } @@ -2327,7 +2321,6 @@ (pagecount - 1) == currpage->page || motdlinestate == IN_SYSDEF) */ newMotdStuff = 1; /* set flag for event loop */ - first = 1; /* check for bold again */ } /* Motd clearing code */ @@ -2355,7 +2348,7 @@ #endif /* add new line to tail of list */ new->next = NULL; - new->bold = 0; + new->bold = -1; new->data = strdup(line); if (motd_lines == NULL) motd_lines = new; @@ -2363,7 +2356,6 @@ old->next = new; old = new; - showMotdWin(w, 0); } /******************************************************************************/ @@ -2383,10 +2375,7 @@ } if ((currpage && page == currpage->page) || page == 0) - { newMotdStuff = 1; /* set flag for event loop */ - first = 1; /* check for bold again */ - } tmp = (*motd_buftail) = (struct piclist *) malloc(sizeof(struct piclist)); tmp->next = NULL; From ahn at users.sourceforge.net Tue Jun 9 22:23:59 2009 From: ahn at users.sourceforge.net (Dave Ahn) Date: Wed, 10 Jun 2009 03:23:59 +0000 Subject: [netrek-cvs] res-rsa COPYRIGHT,NONE,1.1 LICENSE.US,1.1,NONE Message-ID: Update of /cvsroot/netrek/res-rsa In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv4616 Added Files: COPYRIGHT Removed Files: LICENSE.US Log Message: * Update license. --- NEW FILE: COPYRIGHT --- $Id: COPYRIGHT,v 1.1 2009/06/10 03:23:57 ahn Exp $ Netrek License v1 | Netrek RES-RSA Binary Verification System | Copyright (c) 1992-2009, Ray Jones, Sam Shen, Nick Trown, Alec Habig, Kurt | Siegl, Dave Ahn, Bob Tanner. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * The names of the contributors may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --- LICENSE.US DELETED --- From ahn at users.sourceforge.net Tue Jun 9 22:31:28 2009 From: ahn at users.sourceforge.net (Dave Ahn) Date: Wed, 10 Jun 2009 03:31:28 +0000 Subject: [netrek-cvs] res-rsa CMakeLists.txt, 1.1, 1.2 INSTALL, 1.2, 1.3 configure, 1.1, 1.2 configure.in, 1.1, 1.2 mkkey.c, 1.2, 1.3 Message-ID: Update of /cvsroot/netrek/res-rsa In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv5281 Modified Files: CMakeLists.txt INSTALL configure configure.in mkkey.c Log Message: * Add support for GMP3. * Up rev. Index: mkkey.c =================================================================== RCS file: /cvsroot/netrek/res-rsa/mkkey.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- mkkey.c 10 Jun 2009 03:05:47 -0000 1.2 +++ mkkey.c 10 Jun 2009 03:31:26 -0000 1.3 @@ -65,7 +65,7 @@ * static char version[] = "[atm: July 4, 1993] based on [sls: June 7, 1993]"; */ -static char version[] = "[RES-RSA 2.9.2: Mar. 13, 2000][GMP]"; +static char version[] = "[RES-RSA 2.9.3: June 9, 2009][GMP]"; #include "config.h" #include Index: CMakeLists.txt =================================================================== RCS file: /cvsroot/netrek/res-rsa/CMakeLists.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- CMakeLists.txt 10 Jun 2009 03:05:47 -0000 1.1 +++ CMakeLists.txt 10 Jun 2009 03:31:26 -0000 1.2 @@ -20,7 +20,7 @@ set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON) project(res-rsa C) -set(VERSION "2.9.2") +set(VERSION "2.9.3") OPTION(WITH_ANSI "enforce strict ISO C++ conforming" ON) OPTION(VERBOSE "show cmake command line" OFF) Index: configure =================================================================== RCS file: /cvsroot/netrek/res-rsa/configure,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- configure 17 Feb 2000 05:57:22 -0000 1.1 +++ configure 10 Jun 2009 03:31:26 -0000 1.2 @@ -1,29 +1,691 @@ #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# Generated by GNU Autoconf 2.61. # +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. [...5898 lines suppressed...] +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi Index: INSTALL =================================================================== RCS file: /cvsroot/netrek/res-rsa/INSTALL,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- INSTALL 14 Mar 2000 00:28:47 -0000 1.2 +++ INSTALL 10 Jun 2009 03:31:26 -0000 1.3 @@ -14,7 +14,7 @@ change the RSA_* defines in the server's system.mk to use "-lrsa-gmp" instead of "-lrsa". If GMP is installed in a non-standard location, specify the directory to configure with the "--with-gmp=dir" option, -e.g. "--with-gmp=/usr/gnu" or "--with-gmp="../gmp-2.0.2". +e.g. "--with-gmp="../gmp-2.0.2". For Netrek clients, untar this package into a temporary directory, then type './configure; make mkkey' to create the client key generator @@ -25,10 +25,16 @@ the appropriate arguments. It will create rsa_box*.c files and the RSA keypair needed to build an RSA-enabled client. +Alternatively, CMake is also now supported: + mkdir build + cd build + cmake .. + make + If you need the GMP package, get it from the GNU archives at ftp://ftp.gnu.org/pub/gnu/gmp/ or from - ftp://ftp.netrek.org/pub/netrek/gmp/ + http://ftp.netrek.org/pub/netrek/gmp/ Both gmp-1.3.2 and gmp-2.0.2 have been tested to work. Index: configure.in =================================================================== RCS file: /cvsroot/netrek/res-rsa/configure.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- configure.in 17 Feb 2000 05:57:22 -0000 1.1 +++ configure.in 10 Jun 2009 03:31:26 -0000 1.2 @@ -15,7 +15,7 @@ # Check to see if GMP exists. # -GMP_VER=0 +GMP_VER=-1 GMP_INC="" GMP_LIB="" GMP_DIR="" @@ -24,11 +24,11 @@ AC_ARG_WITH(gmp, [ --with-gmp[=DIR] enable gmp support [DIR=yes, no, or gmp dir]] - [ (e.g. ../gmp-1.3.2, /usr/gnu /usr/local/gnu)], + [ (e.g. ../gmp-1.3.2, ../gmp-2.0.2)], [ case "$withval" in no) - GMP_VER=-1 + GMP_VER=-2 ;; yes) ;; @@ -44,12 +44,11 @@ # both "/usr/gnu/include" and "/usr/gnu/lib" GMP_PATH="$srcdir/gmp $srcdir/gmp-1.3.2 $srcdir/gmp-2.0.2 $srcdir/../gmp \ - $srcdir/../gmp-1.3.2 $srcdir/../gmp-2.0.2 /usr/gnu /usr/local \ - /usr/unsupported /usr/local/gnu" + $srcdir/../gmp-1.3.2 $srcdir/../gmp-2.0.2" # If GMP is not disabled... -if test $GMP_VER != -1; then +if test $GMP_VER != -2; then # If GMP directory was specified, do some smart checking if test "$GMP_DIR" != ""; then @@ -62,27 +61,24 @@ for path in $GMP_PATH; do if test -r $path/gmp.h; then - GMP_VER=1 + GMP_VER=0 GMP_INC="-I$path" break - fi - if test -r $path/include/gmp.h; then - GMP_VER=1 + elif test -r $path/include/gmp.h; then + GMP_VER=0 GMP_INC="-I$path/include" break fi done - if test $GMP_VER = 1; then + if test $GMP_VER = 0; then AC_MSG_RESULT(found in $GMP_INC) else AC_MSG_RESULT(not found) fi # search for the library file only if header was found - if test $GMP_VER = 1; then - - GMP_VER=0 + if test $GMP_VER = 0; then AC_MSG_CHECKING(for local libgmp.a) @@ -119,19 +115,24 @@ # If no GMP found yet, search the default system locations for it # We want any local copy of GMP to override the system GMP - if test $GMP_VER = 0; then + if test $GMP_VER = -1; then - AC_CHECK_HEADER(gmp.h, AC_DEFINE(HAVE_GMP_H) GMP_VER=1) + AC_CHECK_HEADER(gmp.h, AC_DEFINE(HAVE_GMP_H) GMP_VER=0) - if test $GMP_VER = 1; then - AC_CHECK_LIB(gmp, mpz_init, AC_DEFINE(HAVE_LIB_GMP), GMP_VER=0) + if test $GMP_VER = 0; then + AC_CHECK_LIB(gmp, mpz_init, AC_DEFINE(HAVE_LIB_GMP) GMP_VER=1) fi # Check for GMP2 - if test $GMP_VER = 1; then + if test $GMP_VER = 0; then AC_CHECK_LIB(gmp, mpz_fdiv_q_ui, AC_DEFINE(HAVE_LIB_GMP2) GMP_VER=2) fi + # Check for GMP3 + if test $GMP_VER = 0; then + AC_CHECK_LIB(gmp, __gmpz_init, AC_DEFINE(HAVE_LIB_GMP3) GMP_VER=3) + fi + fi fi @@ -153,6 +154,10 @@ echo GMP 2.x found, building librsa.a, librsa-gmp.a, mkkey. GMP_TARGETS="librsa-gmp.a mkkey" ;; + 3) + echo GMP 3.x found, building librsa.a, librsa-gmp.a, mkkey. + GMP_TARGETS="librsa-gmp.a mkkey" + ;; *) echo Unknown GMP configuration. ;; From ahn at users.sourceforge.net Tue Jun 9 22:58:38 2009 From: ahn at users.sourceforge.net (Dave Ahn) Date: Wed, 10 Jun 2009 03:58:38 +0000 Subject: [netrek-cvs] res-rsa README,1.2,1.3 Message-ID: Update of /cvsroot/netrek/res-rsa In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv7547 Modified Files: README Log Message: * Doc update. Index: README =================================================================== RCS file: /cvsroot/netrek/res-rsa/README,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- README 14 Mar 2000 00:35:21 -0000 1.2 +++ README 10 Jun 2009 03:58:36 -0000 1.3 @@ -5,59 +5,60 @@ README file for Netrek RES-RSA Module: RES-RSA -Version: 2.9.2 -Release Date: Mon Mar 13 18:29:16 EST 2000 -CVS Tag: res-rsa_2_9_2_release -URL: http://sourceforge.net/project/?group_id=968 -URL: ftp://ftp.netrek.org/pub/netrek/rsa/ +Version: 2.9.3 +Release Date: Tue Jun 9 23:21:17 EDT 2009 +CVS Tag: res-rsa_2_9_3_release +URL: http://launchpad.net/netrek-res-rsa +URL: http://sourceforge.net/projects/netrek +URL: http://ftp.netrek.org/pub/netrek/rsa/ -Note: This release has no new functionality over 2.9.1. -Note: New changes deal only with documentation. There -Note: is no reason to upgrade to 2.9.2 if you are already -Note: using 2.9.1. +Note: This release has no new functionality over 2.9.2. +Note: New changes deal only with documentation and build +Note: script modifications to support later GMP >= 3.x. +Note: There is no reason to upgrade to 2.9.3 if you are already +Note: using 2.9.2. -- 1. What is Netrek RES-RSA? -RES-RSA is an implementation of the RSA public key cipher. It is used -for authentication purposes to validate Netrek clients that connect to -RSA-enabled servers. Without RES-RSA, it would be easy for anyone to -download the client source code and add "borgish" features (such as -auto-phasers, leading-torps and visible cloakers) to cheat at the -game. With RES-RSA, this kind of cheating becomes very difficult, but -not impossible. +RES-RSA is an implementation of the RSA public key cipher. It is used for +verification purposes to validate Netrek clients that connect to RSA-enabled +servers. Without RES-RSA, it would be easy for anyone to download the client +source code and add "borgish" features (such as auto-phasers, leading-torps and +visible cloakers) to cheat at the game. With RES-RSA, this kind of cheating +becomes more difficult, but not impossible. 2. Who wrote RES-RSA? -Ray Jones is the original author of most of the code. Sam Shen is the -original author of mkkey. Other contributors include Nick Trown, Alec -Habig, Kurt Siegl, Dave Ahn, Bob Tanner and probably another dozen or -so people. +Ray Jones is the original author of most of the code. Sam Shen is the original +author of mkkey. Other contributors include Nick Trown, Alec Habig, Kurt +Siegl, Dave Ahn, Bob Tanner and probably another dozen or so people. 3. Where can I download RES-RSA? -RES-RSA development is located under the Netrek project at SourceForge -(http://sourceforge.net). Please visit the site for information on -RES-RSA and the Netrek project. +RES-RSA development is located under the Netrek project at Launchpad +(https://launchpad.net/netrek-res-rsa) as of 2009. RES-RSA was previously +hosted at SourceForge (http://sourceforge.net/projects/netrek) where historical +versions may be found until the migration is complete. The source code is available at the following sites: - ftp://ftp.netrek.org/pub/netrek/rsa/ - http://sourceforge.net/project/?group_id=968 + http://ftp.netrek.org/pub/netrek/rsa/ + http://launchpad.net/netrek-res-rsa + http://sourceforge.net/project/netrek 4. Do I need to download RES-RSA? -Most people don't need to. If you're interested in playing Netrek, -then you can download a precompiled RSA-enabled, "blessed" client -binary from http://www.netrek.org/software.html and not worry about -RES-RSA. If you're interested in creating a "blessed" client, then -you will need both the client source code and the RES-RSA source code. -If you're interested in running an RSA-enabled server, you will also -need RES-RSA. +Most people don't need to. If you're interested in playing Netrek, then you +can download a precompiled RSA-enabled, "blessed" client binary from +http://www.netrek.org/ and not worry about RES-RSA. If you're interested in +creating a "blessed" client, then you will need both the client source code and +the RES-RSA source code. If you're interested in running an RSA-enabled +server, you will also need RES-RSA. 5. How do I install and/or use RES-RSA? @@ -67,25 +68,20 @@ 6. I'm having problems with RES-RSA. Where can I get help? -If you discover a bug, please submit a bug report through SourceForge. -If you fix a bug, please submit a patch through SourceForge. If you -have compile or usage problems, please submit a support request -through SourceForge or contact the development team at: - vanilla-list at us.netrek.org. - -You can locate Netrek at SourceForge at: - http://sourceforge.net/project/?group_id=968 +If you discover a bug, please submit a bug report to the Netrek Developers +mailing list at netrek-dev at lists.netrek.org. 7. Isn't RSA patented? -The RSA algorithm is patented in the United States. Ray Jones +The RSA algorithm was patented in the United States. Ray Jones received special permission from RSA Labs to use the RSA algorithm for Netrek and to distribute the source code and compiled binaries for non-commercial purposes. Dave Ahn verified this permission again with -RSA Labs in 1999. U.S. users of the RES-RSA package must agree to the -RSAREF licensing terms (see the LICENSE.US file). The RSAREF license -does not apply to non-U.S. users. +RSA Labs in 1999. On September 6, 2000, RSA Security Inc released the RSA +algorithm into Public Domain, two weeks in advance of the expiration date +of the patents (September 20, 2000). RSA can now be used freely without +restriction within the U.S. Outside of the United States, the legality of the use of RES-RSA depends upon local, state and national laws governing those users. But From modemhero at users.sourceforge.net Wed Jun 10 18:25:46 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 10 Jun 2009 23:25:46 +0000 Subject: [netrek-cvs] client/netrekxp/src findslot.c, 1.11, 1.12 newwin.c, 1.85, 1.86 socket.c, 1.74, 1.75 Message-ID: Update of /cvsroot/netrek/client/netrekxp/src In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28343/src Modified Files: findslot.c newwin.c socket.c Log Message: More MOTD cleanup from COW. Index: newwin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/newwin.c,v retrieving revision 1.85 retrieving revision 1.86 diff -u -d -r1.85 -r1.86 --- newwin.c 10 Jun 2009 02:48:19 -0000 1.85 +++ newwin.c 10 Jun 2009 23:25:44 -0000 1.86 @@ -33,12 +33,36 @@ extern HINSTANCE MyInstance; extern int metaHeight; /* height of metaserver window */ -static int line = 0; -int MaxMotdLine = 0; +/* line number of motd to display at top of window */ +static int motd_offset = 0; + +/* number of motd lines received since clear */ +int motd_last = 0; + +/* number of times we have received a motd clear */ +int motd_clears = 0; + +/* whether a refresh of the motd should be done on the next SP_MASK */ +int motd_refresh_needed = 0; + +/* if a motd line from the server is this, the client will junk all motd * + * data it currently has. New data may be received */ +#define MOTDCLEARLINE "\033\030CLEAR_MOTD\000" #define LINESPERPARADISEPAGE 38 #define LINESPERPAGE 28 +/* forward linked list of received motd lines */ +struct motd_line +{ + struct motd_line *next; + char *data; + int bold; +}; + +/* pointer to first item in the list */ +static struct motd_line *motd_lines = NULL; + #define S_MOTD 0 #define S_SYSDEF 1 #define S_CREDITS 2 @@ -48,14 +72,8 @@ static struct piclist *motdPics = NULL; static struct piclist **motd_buftail = &motdPics; -/* if a motd line from the server is this, the client will junk all motd * - * data it currently has. New data may be received */ -#define MOTDCLEARLINE "\033\030CLEAR_MOTD\000" - -#define SIZEOF(a) (sizeof (a) / sizeof (*(a))) - #define BOXSIDE (TWINSIDE / 5) -#define MENU_PAD 4 +#define MENU_PAD 4 #define TILESIDE 16 #define YOFF 0 @@ -1625,7 +1643,7 @@ *team = -1; startTime = time (0); if (me->p_whydead != KWINNER && me->p_whydead != KGENOCIDE) - showMotdWin (w, line); + showMotdWin (w, motd_offset); updatedeath (); @@ -1690,8 +1708,7 @@ UpdatePlayerList (); if (paradise && newMotdStuff) { - showMotdWin (w, line); - //showValues(mapw); + showMotdWin (w, motd_offset); } showTimeLeft (elapsed, autoQuit); lasttime = time (0); @@ -1799,47 +1816,47 @@ resetting = 1; break; case 'f': /* Scroll motd forward */ - line = line + (paradise ? LINESPERPARADISEPAGE : LINESPERPAGE); - if (line > MaxMotdLine) + motd_offset = motd_offset + (paradise ? LINESPERPARADISEPAGE : LINESPERPAGE); + if (motd_offset > motd_last) { - line = line - (paradise ? LINESPERPARADISEPAGE : LINESPERPAGE); + motd_offset = motd_offset - (paradise ? LINESPERPARADISEPAGE : LINESPERPAGE); break; } W_ClearWindow (w); - showMotdWin (w, line); + showMotdWin (w, motd_offset); break; case 'b': /* Scroll motd backward */ - if (line == 0) + if (motd_offset == 0) break; - line = line - (paradise ? LINESPERPARADISEPAGE : LINESPERPAGE); - if (line < 0) - line = 0; + motd_offset = motd_offset - (paradise ? LINESPERPARADISEPAGE : LINESPERPAGE); + if (motd_offset < 0) + motd_offset = 0; W_ClearWindow (w); - showMotdWin (w, line); + showMotdWin (w, motd_offset); break; /* Paradise MOTD requires paging */ case 'F': /* Scroll motd a bit forwards */ if (paradise) break; - line = line + 4; - if (line > MaxMotdLine) + motd_offset = motd_offset + 4; + if (motd_offset > motd_last) { - line = line - 4; + motd_offset = motd_offset - 4; break; } W_ClearWindow (w); - showMotdWin (w, line); + showMotdWin (w, motd_offset); break; case 'B': /* Scroll motd a bit backwards */ if (paradise) break; - if (line == 0) + if (motd_offset == 0) break; - line = line - 4; - if (line < 0) - line = 0; + motd_offset = motd_offset - 4; + if (motd_offset < 0) + motd_offset = 0; W_ClearWindow (w); - showMotdWin (w, line); + showMotdWin (w, motd_offset); break; } } @@ -1883,7 +1900,7 @@ else if (event.Window == w) { if (me->p_whydead != KWINNER && me->p_whydead != KGENOCIDE) - showMotdWin (w, line); + showMotdWin (w, motd_offset); } else if (event.Window == helpWin) #ifdef RECORDGAME @@ -2047,14 +2064,15 @@ char *s, *t; int i; int end = 0; + + if (me == NULL) + return 0; if (strlen (line) < 60) - return (0); + return 0; s = line + 4; t = me->p_name; - if (me == NULL) - return (0); for (i = 0; i < 16; i++) { @@ -2073,19 +2091,9 @@ s++; t++; } - return (1); + return 1; } -/* forward linked list of received motd lines */ -struct motd_line -{ - struct motd_line *next; - char *data; - int bold; -}; -/* pointer to first item in the list */ -static struct motd_line *motd_lines = NULL; - /******************************************************************************/ /*** showMotdWin() @@ -2165,7 +2173,8 @@ } if (paradise) showPics(motdwin, atline); - showValues (data); + //if (!motd_clears) + showValues(data); } /******************************************************************************/ @@ -2208,8 +2217,8 @@ void showValues (struct motd_line *data) { - int i; - static char *msg = "OPTIONS SET WHEN YOU STARTED WERE:"; + int i, y; + static char *msg = "Server options set:"; /* try to find the start of the info */ while (1) @@ -2223,17 +2232,19 @@ data = data->next; if (paradise) - /* Use the full window for paradise, and no header */ { + /* Use the full window for paradise, single line spacing, and no header */ for (i = 1; i < 50; i++) { + y = i * W_Textheight; + if (data == NULL) break; if (data->data[0] == '+') /* quick boldface hack */ - W_WriteText (mapw, 20, i * W_Textheight, textColor, + W_WriteText (mapw, 20, y, textColor, data->data + 1, strlen (data->data) - 1, W_BoldFont); else - W_WriteText (mapw, 20, i * W_Textheight, textColor, data->data, + W_WriteText (mapw, 20, y, textColor, data->data, strlen (data->data), W_RegularFont); data = data->next; } @@ -2245,23 +2256,37 @@ W_WriteText (mapw, 20, 14 * W_Textheight, textColor, msg, strlen (msg), W_RegularFont); - for (i = 16; i < 50; i++) + for (i = 16; i < 50; i+=2) { + y = i * W_Textheight; + if (data == NULL) break; if (data->data[0] == '+') /* quick boldface hack */ - W_WriteText (mapw, 20, i * W_Textheight, textColor, + W_WriteText (mapw, 20, y, textColor, data->data + 1, strlen (data->data) - 1, W_BoldFont); else - W_WriteText (mapw, 20, i * W_Textheight, textColor, data->data, + W_WriteText (mapw, 20, y, textColor, data->data, strlen (data->data), W_RegularFont); data = data->next; - i++; } } } /******************************************************************************/ +/*** motd_refresh() +/*** Refresh the displayed MOTD +/******************************************************************************/ +void motd_refresh (void) +{ + if (motd_refresh_needed) + { + showMotdWin(w, motd_offset); + motd_refresh_needed = 0; + } +} + +/******************************************************************************/ /*** ClearMotd() /*** Free the current motd_lines /******************************************************************************/ @@ -2287,6 +2312,9 @@ free (this); } motd_lines = NULL; + motd_offset = 0; + motd_last = 0; + motd_clears++; } /******************************************************************************/ @@ -2328,7 +2356,6 @@ { W_ClearWindow (w); ClearMotd (); - MaxMotdLine = 0; statmode = 0; return; } @@ -2341,11 +2368,8 @@ return; if (!statmode) - MaxMotdLine++; + motd_last++; -#ifdef DEBUG - LineToConsole("%s\n", line); -#endif /* add new line to tail of list */ new->next = NULL; new->bold = -1; @@ -2356,6 +2380,7 @@ old->next = new; old = new; + motd_refresh_needed++; } /******************************************************************************/ Index: findslot.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/findslot.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- findslot.c 16 Apr 2008 00:08:11 -0000 1.11 +++ findslot.c 10 Jun 2009 23:25:44 -0000 1.12 @@ -103,7 +103,7 @@ findslot (void) { int oldcount = -1; - extern int MaxMotdLine; + extern int motd_last; int WaitMotdLine = 0; int showMotd = booleanDefault ("showMotd", 1); W_Event event; @@ -186,7 +186,7 @@ { WaitMotdLine += 28; /* scroll to start if it goes over */ - if (WaitMotdLine > MaxMotdLine) + if (WaitMotdLine > motd_last) WaitMotdLine = 0; } W_ClearWindow (motdWin); Index: socket.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/socket.c,v retrieving revision 1.74 retrieving revision 1.75 diff -u -d -r1.74 -r1.75 --- socket.c 9 Jun 2009 01:04:33 -0000 1.74 +++ socket.c 10 Jun 2009 23:25:44 -0000 1.75 @@ -2190,6 +2190,7 @@ void handleMask (struct mask_spacket *packet) { + motd_refresh(); tournMask = packet->mask; } @@ -2878,6 +2879,7 @@ ltd.weapons.plasma.damage.inflicted = ntohl(packet->wsdi); ltd.weapons.plasma.damage.taken = ntohl(packet->wsdt); +#if 0 LineToConsole("SP_LTD test output begins\n"); dump_prefix("kt", "kills total"); dump_stat(kills.total); dump_prefix("kmax", "kills max"); dump_max(kills.max); @@ -2960,6 +2962,7 @@ dump_prefix("wsdi", "weap smack damage inflicted"); dump_stat(weapons.plasma.damage.inflicted); dump_prefix("wsdt", "weap smack damage taken"); dump_stat(weapons.plasma.damage.taken); LineToConsole("SP_LTD test output ends\n"); +#endif } void From modemhero at users.sourceforge.net Wed Jun 10 18:25:46 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 10 Jun 2009 23:25:46 +0000 Subject: [netrek-cvs] client/netrekxp/include proto.h,1.73,1.74 Message-ID: Update of /cvsroot/netrek/client/netrekxp/include In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28343/include Modified Files: proto.h Log Message: More MOTD cleanup from COW. Index: proto.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/proto.h,v retrieving revision 1.73 retrieving revision 1.74 diff -u -d -r1.73 -r1.74 --- proto.h 10 Jun 2009 01:24:02 -0000 1.73 +++ proto.h 10 Jun 2009 23:25:44 -0000 1.74 @@ -821,6 +821,7 @@ int realNumShips (int owner); int deadTeam (int owner); int checkBold (char *line); +void motd_refresh (void); void ClearMotd (void); void showMotdWin (W_Window motdwin, int atline); struct list; From modemhero at users.sourceforge.net Thu Jun 11 17:10:42 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Thu, 11 Jun 2009 22:10:42 +0000 Subject: [netrek-cvs] client/netrekxp/resources/netrekrc netrekrc.txt, 1.18, 1.19 Message-ID: Update of /cvsroot/netrek/client/netrekxp/resources/netrekrc In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23526/netrekrc Modified Files: netrekrc.txt Log Message: Added support for server feature packet TIPS. Added netrekrc option "showTips". Index: netrekrc.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/netrekrc/netrekrc.txt,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- netrekrc.txt 10 Jun 2009 01:24:13 -0000 1.18 +++ netrekrc.txt 11 Jun 2009 22:10:40 -0000 1.19 @@ -427,6 +427,9 @@ # Show statistics window showStats: off +# Clear MOTD and show server generated tip messages +showTips: on + # Draw lines for tractor/pressor showTractorPressor: on From modemhero at users.sourceforge.net Thu Jun 11 17:10:48 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Thu, 11 Jun 2009 22:10:48 +0000 Subject: [netrek-cvs] client/netrekxp/resources/htmlhelp/html generalconfig.html, 1.63, 1.64 Message-ID: Update of /cvsroot/netrek/client/netrekxp/resources/htmlhelp/html In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23548 Modified Files: generalconfig.html Log Message: Added support for server feature packet TIPS. Added netrekrc option "showTips". Index: generalconfig.html =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/htmlhelp/html/generalconfig.html,v retrieving revision 1.63 retrieving revision 1.64 diff -u -d -r1.63 -r1.64 --- generalconfig.html 6 Jun 2009 03:29:26 -0000 1.63 +++ generalconfig.html 11 Jun 2009 22:10:46 -0000 1.64 @@ -1289,6 +1289,16 @@ +showTips +Clear MOTD and show server generated tip messages + +
    +
  • on (default)
  • +
  • off
  • +
+ + + showTractorPressor Show tractor/pressor beams From modemhero at users.sourceforge.net Thu Jun 11 17:10:42 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Thu, 11 Jun 2009 22:10:42 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.219, 1.220 netrekrc_options.txt, 1.62, 1.63 Message-ID: Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23526/docs Modified Files: changes.txt netrekrc_options.txt Log Message: Added support for server feature packet TIPS. Added netrekrc option "showTips". Index: netrekrc_options.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc_options.txt,v retrieving revision 1.62 retrieving revision 1.63 diff -u -d -r1.62 -r1.63 --- netrekrc_options.txt 6 Jun 2009 03:29:20 -0000 1.62 +++ netrekrc_options.txt 11 Jun 2009 22:10:40 -0000 1.63 @@ -273,6 +273,7 @@ showPlanetOwner: (on/off) show planet owner on galaxy showStars: (on/off) show background stars showStats: (on/off) show ship statistics +showTips: (on/off) show server generated tip messages showTractorPressor: (on/off) show tractors and pressors shrinkPhaserOnMiss: (on/off) don't draw phaser line on miss singleMacro: (string) macro keys that will trigger macro without macro mode Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.219 retrieving revision 1.220 diff -u -d -r1.219 -r1.220 --- changes.txt 6 Jun 2009 03:29:20 -0000 1.219 +++ changes.txt 11 Jun 2009 22:10:40 -0000 1.220 @@ -31,6 +31,11 @@ to be sent to the client. 8) Added netrekrc option "metaBroncoOnly" to only list Bronco/INL servers in the list of servers provided by the aggregate metaservers. +9) Added support for server feature packet TIPS. This clears the MOTD window +and provides tips on how to improve your play based on data the server records +of your current session. +10) Added netrekrc option "showTips" to choose whether or not to display the +server tip messages supplied by TIPS. Netrek XP 2009, Version 1.0: (Released July-2008) From modemhero at users.sourceforge.net Thu Jun 11 17:10:32 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Thu, 11 Jun 2009 22:10:32 +0000 Subject: [netrek-cvs] client/netrekxp/include data.h,1.121,1.122 Message-ID: Update of /cvsroot/netrek/client/netrekxp/include In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23497/include Modified Files: data.h Log Message: Added support for server feature packet TIPS. Added netrekrc option "showTips". Index: data.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v retrieving revision 1.121 retrieving revision 1.122 diff -u -d -r1.121 -r1.122 --- data.h 9 Jun 2009 02:23:00 -0000 1.121 +++ data.h 11 Jun 2009 22:10:30 -0000 1.122 @@ -629,6 +629,7 @@ extern int F_auto_weapons; extern int F_sp_rank; extern int F_sp_ltd; +extern int F_tips; extern int F_terrain; /* paradise */ extern int F_armies_shipcap; /* paradise */ @@ -794,6 +795,7 @@ extern int fullBitmapRotation; /* draw old bitmap sets to all angles */ extern int hideConsole; /* show console window or not */ extern int autoPhaser; /* phaser exact location of enemy target closest to cursor */ +extern int showTips; /* clear MOTD and show server generated tip messages */ extern struct context *context; #endif /* _h_data */ From modemhero at users.sourceforge.net Thu Jun 11 17:10:32 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Thu, 11 Jun 2009 22:10:32 +0000 Subject: [netrek-cvs] client/netrekxp/src data.c, 1.133, 1.134 defaults.c, 1.107, 1.108 feature.c, 1.33, 1.34 Message-ID: Update of /cvsroot/netrek/client/netrekxp/src In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23497/src Modified Files: data.c defaults.c feature.c Log Message: Added support for server feature packet TIPS. Added netrekrc option "showTips". Index: feature.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/feature.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- feature.c 8 Jun 2009 22:26:07 -0000 1.33 +++ feature.c 11 Jun 2009 22:10:30 -0000 1.34 @@ -105,6 +105,7 @@ {"AUTO_WEAPONS", &F_auto_weapons, 'S', 1, 0, 0}, {"SP_RANK", &F_sp_rank, 'S', 1, 0, 0}, {"SP_LTD", &F_sp_ltd, 'S', 1, 0, 0}, + {"TIPS", &F_tips, 'S', 1, 0, 0}, {0, 0, 0, 0, 0, 0} }; @@ -131,6 +132,8 @@ value = useFullShipInfo; else if (!strcmp(f->name, "FULL_WEAPON_RESOLUTION")) value = useFullWeapInfo; + else if (!strcmp(f->name, "TIPS")) + value = showTips; else if (!strcmp(f->name, "SP_GENERIC_32")) { value = useGeneric32; Index: defaults.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v retrieving revision 1.107 retrieving revision 1.108 diff -u -d -r1.107 -r1.108 --- defaults.c 9 Jun 2009 02:09:45 -0000 1.107 +++ defaults.c 11 Jun 2009 22:10:30 -0000 1.108 @@ -763,6 +763,12 @@ NULL } }, + {"showTips", &showTips, RC_BOOL, + { + "Clear MOTD and show server generated tip messages", + NULL + } + }, {"showTractorPressor", &showTractorPressor, RC_BOOL, { "Draw lines for tractor/pressor", @@ -1777,6 +1783,7 @@ showArmy = intDefault ("showArmy", showArmy); showCloakers = booleanDefault ("showCloakers", showCloakers); autoPhaser = booleanDefault ("autoPhaser", autoPhaser); + showTips = booleanDefault ("showTips", showTips); redrawDelay = intDefault ("redrawDelay", redrawDelay); planetHighlighting = booleanDefault ("planetHighlighting", planetHighlighting); rotatePlanets = booleanDefault ("rotatePlanets", rotatePlanets); Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.133 retrieving revision 1.134 diff -u -d -r1.133 -r1.134 --- data.c 9 Jun 2009 02:23:00 -0000 1.133 +++ data.c 11 Jun 2009 22:10:30 -0000 1.134 @@ -722,6 +722,7 @@ int F_auto_weapons = 0; int F_sp_rank = 0; int F_sp_ltd = 0; +int F_tips = 0; int F_terrain = 0; /* paradise */ int F_armies_shipcap = 0; /* paradise */ @@ -876,5 +877,6 @@ int fullBitmapRotation = 1; /* draw old bitmap sets to all angles */ int hideConsole = 0; /* show console window or not */ int autoPhaser = 1; /* phaser exact location of enemy target closest to cursor */ +int showTips = 0; /* clear MOTD and show server generated tip messages */ struct context *context; From quozl at users.sourceforge.net Mon Jun 15 18:59:11 2009 From: quozl at users.sourceforge.net (James Cameron) Date: Mon, 15 Jun 2009 23:59:11 +0000 Subject: [netrek-cvs] client/netrekxp/src parsemeta.c,1.51,1.52 Message-ID: Update of /cvsroot/netrek/client/netrekxp/src In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19454 Modified Files: parsemeta.c Log Message: metaBroncoOnly review Index: parsemeta.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/parsemeta.c,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- parsemeta.c 6 Jun 2009 03:44:21 -0000 1.51 +++ parsemeta.c 15 Jun 2009 23:59:09 -0000 1.52 @@ -373,7 +373,8 @@ return 0; } req = (char *) malloc(80); - sprintf(req, "?version=%s %s %s", version, mvers, (metaBroncoOnly ? "Bronco" : "")); + sprintf(req, "?version=%s %s %s", version, mvers, + metaBroncoOnly ? "bronco" : "open"); reqlen = strlen(req); } From modemhero at users.sourceforge.net Tue Jun 23 17:18:05 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 23 Jun 2009 22:18:05 +0000 Subject: [netrek-cvs] client/netrekxp/include packets.h,1.27,1.28 Message-ID: Update of /cvsroot/netrek/client/netrekxp/include In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29905/include Modified Files: packets.h Log Message: Remove paradise warp beacons. This was removed from paradise server and client as well. Set default update rate to 25. Update rate of 50 has been observed to cause problems on lower end systems or systems with multiple applications open. Index: packets.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/packets.h,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- packets.h 8 Jun 2009 22:55:03 -0000 1.27 +++ packets.h 23 Jun 2009 22:18:02 -0000 1.28 @@ -1229,7 +1229,7 @@ try to coordinate your additions with other hackers. */ enum thingy_types { SHP_BLANK, SHP_MISSILE, SHP_BOOM, SHP_TORP, SHP_PLASMA, SHP_MINE, - SHP_PBOOM, SHP_FIGHTER, SHP_WARP_BEACON, SHP_FBOOM, SHP_DBOOM + SHP_PBOOM, SHP_FIGHTER, SHP_FBOOM, SHP_DBOOM }; struct thingy_info_spacket { From modemhero at users.sourceforge.net Tue Jun 23 17:18:04 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 23 Jun 2009 22:18:04 +0000 Subject: [netrek-cvs] client/netrekxp NetrekXP to do list.C,1.169,1.170 Message-ID: Update of /cvsroot/netrek/client/netrekxp In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29905 Modified Files: NetrekXP to do list.C Log Message: Remove paradise warp beacons. This was removed from paradise server and client as well. Set default update rate to 25. Update rate of 50 has been observed to cause problems on lower end systems or systems with multiple applications open. Index: NetrekXP to do list.C =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/NetrekXP to do list.C,v retrieving revision 1.169 retrieving revision 1.170 diff -u -d -r1.169 -r1.170 --- NetrekXP to do list.C 25 May 2009 16:29:43 -0000 1.169 +++ NetrekXP to do list.C 23 Jun 2009 22:18:02 -0000 1.170 @@ -38,7 +38,7 @@ 3) A bunch of gridline/zoom options should be made into netrekrc options. 4) The galactic zoom doesn't work 5) Some of the paradise packet types may need some work -6) Still missing asteroids and (flashing) warpbeacons. +6) Still missing asteroids. 7) Show ratings on full/wide playerlist. 9) Don't think there is gettarget support for astral bodies like nebulae and stars and black holes. Might be an issue with macros. From modemhero at users.sourceforge.net Tue Jun 23 17:18:05 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 23 Jun 2009 22:18:05 +0000 Subject: [netrek-cvs] client/netrekxp/src local.c, 1.121, 1.122 socket.c, 1.75, 1.76 Message-ID: Update of /cvsroot/netrek/client/netrekxp/src In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29905/src Modified Files: local.c socket.c Log Message: Remove paradise warp beacons. This was removed from paradise server and client as well. Set default update rate to 25. Update rate of 50 has been observed to cause problems on lower end systems or systems with multiple applications open. Index: local.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v retrieving revision 1.121 retrieving revision 1.122 diff -u -d -r1.121 -r1.122 --- local.c 9 Jun 2009 01:23:01 -0000 1.121 +++ local.c 23 Jun 2009 22:18:03 -0000 1.122 @@ -2807,18 +2807,7 @@ case SHP_MINE: case SHP_BOOM: */ -/* - case SHP_WARP_BEACON: - image = getImage(I_WARPBEACON); - frame = udcounter; - if (k->t_fuse > 4) { - image = getImage(I_WARPFLASH); - } - if (++(k->t_fuse) > 6) { - k->t_fuse = 0; - } - break; -*/ + default: LineToConsole("Wierd...unknown thingy number (%d).\n", k->t_shape); return; Index: socket.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/socket.c,v retrieving revision 1.75 retrieving revision 1.76 diff -u -d -r1.75 -r1.76 --- socket.c 10 Jun 2009 23:25:44 -0000 1.75 +++ socket.c 23 Jun 2009 22:18:03 -0000 1.76 @@ -3387,9 +3387,6 @@ GWIDTH / 2); } #endif - - if (thetorp->t_shape == SHP_WARP_BEACON) - redrawall = 1; // shoot, route has changed } void handleThingyInfo (struct thingy_info_spacket *packet) @@ -3408,9 +3405,6 @@ thetorp->t_owner = ntohs(packet->owner); - if (thetorp->t_shape == SHP_WARP_BEACON) - redrawall = 1; // redraw the lines, I guess - if (ntohs(packet->shape) == SHP_BOOM && thetorp->t_shape == SHP_BLANK) { // FAT: redundant explosion; don't update p_ntorp // LineToConsole("texplode ignored\n"); From modemhero at users.sourceforge.net Tue Jun 23 17:18:05 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 23 Jun 2009 22:18:05 +0000 Subject: [netrek-cvs] client/netrekxp/resources/netrekrc netrekrc.txt, 1.19, 1.20 Message-ID: Update of /cvsroot/netrek/client/netrekxp/resources/netrekrc In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29905/resources/netrekrc Modified Files: netrekrc.txt Log Message: Remove paradise warp beacons. This was removed from paradise server and client as well. Set default update rate to 25. Update rate of 50 has been observed to cause problems on lower end systems or systems with multiple applications open. Index: netrekrc.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/netrekrc/netrekrc.txt,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- netrekrc.txt 11 Jun 2009 22:10:40 -0000 1.19 +++ netrekrc.txt 23 Jun 2009 22:18:03 -0000 1.20 @@ -512,7 +512,7 @@ # 1-50 (or whatever server frame rate is) # Value may be constrained by server to be evenly divisible # by server frame rate -updatesPerSec: 50 +updatesPerSec: 25 # Crosscheck with server to make sure all planet information is # correct. Prevents against lost planet updates which can cause From modemhero at users.sourceforge.net Tue Jun 23 19:52:24 2009 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 24 Jun 2009 00:52:24 +0000 Subject: [netrek-cvs] client/netrekxp/src beeplite.c, 1.18, 1.19 local.c, 1.122, 1.123 short.c, 1.31, 1.32 socket.c, 1.76, 1.77 Message-ID: Update of /cvsroot/netrek/client/netrekxp/src In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10133 Modified Files: beeplite.c local.c short.c socket.c Log Message: Restore explosions (ships, torp, plasma) animation to original design which is full animation over 1 second. Changing from 5->10 updates/sec altered the animation speed of these events. Also changed beeplite animation length in a similiar manner. Animation speed for beeplite was not changed. Index: short.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/short.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- short.c 9 Jun 2009 00:08:04 -0000 1.31 +++ short.c 24 Jun 2009 00:52:22 -0000 1.32 @@ -1100,7 +1100,7 @@ { /* Fuse requires minimum value of 2 to ensure a redraw, fuse decremented before drawing torp in local.c */ - thetorp->t_fuse = MAX(2, BMP_TORPDET_FRAMES * server_ups / 10); + thetorp->t_fuse = MAX(2, BMP_TORPDET_FRAMES * server_ups / 5); } } } /* if */ Index: beeplite.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/beeplite.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- beeplite.c 8 Jun 2009 22:26:07 -0000 1.18 +++ beeplite.c 24 Jun 2009 00:52:22 -0000 1.19 @@ -55,7 +55,7 @@ void liteplanet(struct planet *l) { - beep_lite_cycle_time_planet = 10 * server_ups / 10; + beep_lite_cycle_time_planet = 10 * server_ups / 5; emph_planet_seq_n[l->pl_no] = beep_lite_cycle_time_planet; l->pl_flags |= PLREDRAW; /* Leave redraw on until * * * done highlighting */ @@ -68,7 +68,7 @@ redrawPlayer[j->p_no] = 1; - beep_lite_cycle_time_player = 10 * server_ups / 10; + beep_lite_cycle_time_player = 10 * server_ups / 5; emph_player_seq_n[j->p_no] = beep_lite_cycle_time_player; } @@ -243,7 +243,7 @@ for (tts_len = 0; (*pm != '|' && tts_len < tts_max_len); tts_len++) lastIn[tts_len] = *pm++; lastIn[tts_len] = '\0'; - tts_timer = tts_time * server_ups / 10; + tts_timer = tts_time * server_ups / 5; } break; Index: local.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v retrieving revision 1.122 retrieving revision 1.123 diff -u -d -r1.122 -r1.123 --- local.c 23 Jun 2009 22:18:03 -0000 1.122 +++ local.c 24 Jun 2009 00:52:22 -0000 1.123 @@ -1651,7 +1651,7 @@ { int i; - i = j->p_explode * 10 / server_ups; + i = j->p_explode * 5 / server_ups; #ifdef SOUND if (j->p_explode == 1) @@ -2148,7 +2148,7 @@ else { /* Leave the torp to explode on its own */ - k->t_updateFuse = BMP_TORPDET_FRAMES * server_ups / 10; + k->t_updateFuse = BMP_TORPDET_FRAMES * server_ups / 5; k->t_clear = 1; } } @@ -2180,7 +2180,7 @@ if (k->t_status == TEXPLODE) { k->t_fuse--; - frame = k->t_fuse * 10 / server_ups; + frame = k->t_fuse * 5 / server_ups; if (k->t_fuse < 0) { @@ -2193,7 +2193,7 @@ frame = BMP_TORPDET_FRAMES - 1; #ifdef SOUND - if (k->t_fuse == (MAX(2, BMP_TORPDET_FRAMES * server_ups / 10) - 1)) + if (k->t_fuse == (MAX(2, BMP_TORPDET_FRAMES * server_ups / 5) - 1)) { SetDistAngle(dx, dy); // At short distances, don't use angular sound @@ -2254,7 +2254,7 @@ { k->t_fuse++; - frame = k->t_fuse * 10 / server_ups; + frame = k->t_fuse * 5 / server_ups; if ((frame > BMP_TORP_FRAMES - 1) || (frame < 0)) { @@ -2376,7 +2376,7 @@ else { /* Leave the plasma to explode on its own */ - pt->pt_updateFuse = BMP_TORPDET_FRAMES * server_ups / 10; + pt->pt_updateFuse = BMP_TORPDET_FRAMES * server_ups / 5; pt->pt_clear = 1; } } @@ -2408,7 +2408,7 @@ if (pt->pt_status == PTEXPLODE) { pt->pt_fuse--; - frame = pt->pt_fuse * 10 / server_ups; + frame = pt->pt_fuse * 5 / server_ups; if (pt->pt_fuse < 0) { @@ -2420,7 +2420,7 @@ frame = BMP_TORPDET_FRAMES - 1; #ifdef SOUND - if (pt->pt_fuse == (MAX(2, BMP_TORPDET_FRAMES * server_ups / 10) - 1)) + if (pt->pt_fuse == (MAX(2, BMP_TORPDET_FRAMES * server_ups / 5) - 1)) { SetDistAngle(dx, dy); // At short distances, don't use angular sound @@ -2483,7 +2483,7 @@ { pt->pt_fuse++; - frame = pt->pt_fuse * 10 / server_ups; + frame = pt->pt_fuse * 5 / server_ups; if ((frame > BMP_TORP_FRAMES - 1) || (frame < 0)) { @@ -2651,7 +2651,7 @@ break; case SHP_FBOOM: k->t_fuse--; - frame = k->t_fuse * 10 / server_ups; + frame = k->t_fuse * 5 / server_ups; if (k->t_fuse < 0) { @@ -2663,7 +2663,7 @@ frame = BMP_FIGHTERDET_FRAMES - 1; #ifdef SOUND - if (k->t_fuse == (MAX(2, BMP_FIGHTERDET_FRAMES * server_ups / 10) - 1)) + if (k->t_fuse == (MAX(2, BMP_FIGHTERDET_FRAMES * server_ups / 5) - 1)) { SetDistAngle(dx, dy); // At short distances, don't use angular sound @@ -2693,7 +2693,7 @@ case SHP_PBOOM: case SHP_DBOOM: k->t_fuse--; - frame = k->t_fuse * 10 / server_ups; + frame = k->t_fuse * 5 / server_ups; if (k->t_fuse < 0) { @@ -2705,7 +2705,7 @@ frame = BMP_DRONEDET_FRAMES - 1; #ifdef SOUND - if (k->t_fuse == (MAX(2, BMP_DRONEDET_FRAMES * server_ups / 10) - 1)) + if (k->t_fuse == (MAX(2, BMP_DRONEDET_FRAMES * server_ups / 5) - 1)) { SetDistAngle(dx, dy); // At short distances, don't use angular sound Index: socket.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/socket.c,v retrieving revision 1.76 retrieving revision 1.77 diff -u -d -r1.76 -r1.77 --- socket.c 23 Jun 2009 22:18:03 -0000 1.76 +++ socket.c 24 Jun 2009 00:52:22 -0000 1.77 @@ -1315,7 +1315,7 @@ { /* Fuse requires minimum value of 2 to ensure a redraw, fuse decremented before drawing torp in local.c */ - thetorp->t_fuse = MAX(2, BMP_TORPDET_FRAMES * server_ups / 10); + thetorp->t_fuse = MAX(2, BMP_TORPDET_FRAMES * server_ups / 5); } } } @@ -1991,7 +1991,7 @@ { /* Fuse requires minimum value of 2 to ensure a redraw, fuse decremented before drawing torp in local.c */ - thetorp->pt_fuse = MAX(2, BMP_TORPDET_FRAMES * server_ups / 10); + thetorp->pt_fuse = MAX(2, BMP_TORPDET_FRAMES * server_ups / 5); } } } @@ -3426,12 +3426,12 @@ if(thetorp->t_shape == SHP_FIGHTER) { shape = SHP_FBOOM; - thetorp->t_fuse = MAX(2, BMP_DRONEDET_FRAMES * server_ups / 10); + thetorp->t_fuse = MAX(2, BMP_DRONEDET_FRAMES * server_ups / 5); } if(thetorp->t_shape == SHP_MISSILE) { shape = SHP_DBOOM; - thetorp->t_fuse = MAX(2, BMP_DRONEDET_FRAMES * server_ups / 10); + thetorp->t_fuse = MAX(2, BMP_DRONEDET_FRAMES * server_ups / 5); } } thetorp->t_shape = shape;