Well rather than put 100s of lines of code in ChangeLog to justify, the phaser message change, I'll just post my results here: All checked on 5/19/06 vs. latest versions at ftp.netrek.org Latest COW/NetrekXP/NetrekXP Mod doPhaser = showPhaser && (strncmp(text, "Phaser burst", 12) == 0); warncount = strlen(text); #ifdef PHASER_STATS if (doPhaser && phaserShowStats) { sprintf(newtext, "%s [%2d%%]", text, phaserStatTry ? (phaserStatHit * 100) / phaserStatTry : 0); warncount += 6; W_WriteText(warnw, 5, 5, textColor, newtext, warncount, W_RegularFont); } else #endif W_WriteText(warnw, 5, 5, textColor, text, warncount, W_RegularFont); COW 2.02 Tested with client, works ok (didn't look at 10 year old source though, just latest COW) Ted Turner 1.3.1 if(!W_IsMapped(warnw)) return; if (*count > 0) { /* XFIX */ W_ClearWindow(warnw); /*W_ClearArea(warnw, W_XOFF, W_YOFF, W_Textwidth * *count, W_Textheight);*/ if(hudwarning) W_DirectMaskText(w, center - (*count / 2) * W_Textwidth, y, backColor, save_buffer, *count, font); } *count = strlen(text); W_WriteText(warnw, W_XOFF, W_YOFF, textColor, text, *count, font); if(hudwarning) { strcpy(save_buffer, text); W_DirectMaskText(w, center - (*count / 2) * W_Textwidth, y, color, save_buffer, *count, font); #ifdef BUFFERING /* flush the buffer if there is one and we're not playing. Flushing is too slow to do when playing - wait for the next update [BDyess] */ if(me) if((me->p_status == PFREE || me->p_status == POUTFIT) && W_IsBuffered(w)) W_DisplayBuffer(w); #endif /*BUFFERING [BDyess]*/ } if (strncmp(text, "Phaser", 6) == 0) { if (strncmp(text + 7, "missed", 6) == 0) { phasFired++; if (!logPhaserMissed) return; thisHit = 0; } else if (strncmp(text + 7, "burst", 5) != 0 && strncmp(text + 7, "shot", 4) != 0) return; else { /* a hit! */ phasFired++; phasHits++; thisHit = 1; } if (phaserStats) { if (thisHit) { d = &text[strlen(text)]; while (!isdigit(*d) && d > text) /* find the last number in the string, should be damage */ d--; while (d > text && isdigit(*d)) d--; if (d > text) { dmg = atoi(d); totalDmg += dmg; avgDmg = (float) totalDmg / (float) phasHits; phasRatio = (100 * phasHits) / (float) phasFired; sprintf(newtext, "Av:%5.2f, Hit:%5.2f%%: ", avgDmg, phasRatio); } } else { /* a miss */ sprintf(newtext, "Hit: %d, Miss: %d, Dmg: %d: ", phasHits, phasFired - phasHits, totalDmg); } } else { /* not keeping phaser stats right now */ phasFired--; if (thisHit) phasHits--; newtext[0] = '\0'; } strncat(newtext, text, 80); len = strlen(newtext); newtext[len++] = ' '; strcpy(newtext + len, timeString(time(NULL))); dmessage(newtext, 0, 254, 0); Gltrek: Couldn't find source BRMH 2.4.0 warncount = strlen(text); if(!recv_short && strncmp(text, "Phaser burst", 12)==0){ if(phaserWindow){ W_WriteText(phaserwin, 0, 0, textColor, text, strlen(text), W_MesgFont); W_FlushScrollingWindow(phaserwin); return; } if (phas_msgi){ W_WriteText(messwi, 0, 0, textColor, text, strlen(text), W_MesgFont); return; }