Update of /cvsroot/netrek/client/netrekxp/src
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv29199/src
Modified Files:
beeplite.c data.c defaults.c feature.c getname.c input.c
local.c makefile map.c option.c parsemeta.c reserved.c short.c
socket.c sound.c winmain.c
Added Files:
makecyg
Log Message:
Following COW patch "50 fps, accept new UPS feature packet", client and server now negotiate
a update rate. Default is 50, but it still works with older servers running at 10 fps.
Preliminary work on compiling with cygwin - added some headers for compile purposes, a few new
Cygwin #ifdefs, 3 new cygwin makefiles that don't work yet (and probably never will without outside
help).
Index: getname.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/getname.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- getname.c 13 Jan 2007 02:53:27 -0000 1.7
+++ getname.c 23 Feb 2007 13:43:56 -0000 1.8
@@ -30,6 +30,10 @@
#include "data.h"
#include "proto.h"
+#ifdef CYGWIN
+#include <sys/time.h>
+#endif
+
static char tempname[16];
static char password1[16];
static char password2[16];
--- NEW FILE: makecyg ---
#
# This makefile is written for Cygwin
#
#DEBUG = 1
RSA = 1
# Cygwin
cc = gcc
rc = gcc
link = gcc
compileandlink = gcc
# Compiler and linker flags
ifndef DEBUG
cflags = -O2 -v -DWIN32 -DBorland -mwindows
ccompileonly = -c
ldebug = -v
DEBUGDEFS = -DDEBUG
else
cflags = -O2 -DWIN32 -DBorland -mwindows
ccompileonly = -c
ldebug = -w-dup
endif
# Libs
LIBOPTS = -L/cygdrive/c/netrekxp/win32/lib/VCC
LIBS = /cygdrive/c/netrekxp/win32/lib/VCC/SDL.LIB \
/cygdrive/c/netrekxp/win32/lib/VCC/SDL_mixer.LIB \
/cygdrive/c/netrekxp/win32/lib/VCC/SDLmain.LIB \
# "/cygdrive/c/Program Files/Microsoft Platform SDK/Lib/LibCW32mt.LIB" \
# "/cygdrive/c/Program Files/Microsoft Platform SDK/Lib/IMPORT32.LIB" \
"/cygdrive/c/Program Files/Microsoft Platform SDK/Lib/User32.lib" \
"/cygdrive/c/Program Files/Microsoft Platform SDK/Lib/Gdi32.lib" \
"/cygdrive/c/Program Files/Microsoft Platform SDK/Lib/Wsock32.lib" \
"/cygdrive/c/Program Files/Microsoft Platform SDK/Lib/Kernel32.lib" \
"/cygdrive/c/Program Files/Microsoft Platform SDK/Lib/Shell32.lib" \
"/cygdrive/c/Program Files/Microsoft Platform SDK/Lib/Winmm.lib" \
"/cygdrive/c/Program Files/Microsoft Platform SDK/Lib/Mpr.lib" \
"/cygdrive/c/Program Files/Microsoft Platform SDK/Lib/Msimg32.lib" \
$(GMPLIB)
INCS = -I/cygdrive/c/netrekxp/include -I/cygdrive/c/netrekxp/win32 -I/cygdrive/c/netrekxp/win32/h -I/cygdrive/c/netrekxp/win32/SDL/
ROBJ = beeplite.o check.o colors.o console.o data.o death.o defaults.o dmessage.o\
enter.o findslot.o getname.o getship.o helpwin.o hintwin.o inform.o\
interface.o newwin.o option.o planetlist.o macrowin.o\
map.o playerlist.o ranklist.o reserved.o sintab.o\
smessage.o socket.o stats.o util.o war.o warning.o\
udpopt.o ping.o pingstats.o rotate.o parsemeta.o\
spopt.o dashboard.o dashboard3.o\
short.o distress.o senddist.o defwin.o tools.o sound.o\
docwin.o feature.o\
string_util.o local.o cowmain.o playback.o
RSRC = beeplite.c check.c colors.c console.c data.c death.c defaults.c dmessage.c\
enter.c findslot.c getname.c getship.c helpwin.c hintwin.c inform.c\
input.c interface.c newwin.c option.c planetlist.c\
macrowin.c map.c playerlist.c ranklist.c redraw.c\
smessage.c parsemeta.c socket.c stats.c util.c war.c\
warning.c udpopt.c sintab.c ping.c pingstats.c rotate.c\
spopt.c dashboard.c dashboard3.c\
short.c distress.c senddist.c defwin.c tools.c sound.c\
docwin.c feature.c reserved.c\
string_util.c local.c cowmain.c playback.c
INPUTOBJ = input.o redraw.o
MAINOBJ = main.o
MAINSRC = main.c
ifndef RSA
GMPLIB = ..\Win32\lib\BCC\libgmpbcc.lib
RSADEFS = -DRSA
RSASRC = rsa_box.c rsa_box_0.c rsa_box_1.c rsa_box_2.c\
rsa_box_3.c rsa_box_4.c
RSAOBJ = rsa_box.o rsa_box_0.o rsa_box_1.o rsa_box_2.o\
rsa_box_3.o rsa_box_4.o
endif
WIN32_SRCS = winmain.c mswindow.c winsndlib.c
WIN32_OBJS = winmain.o mswindow.o winsndlib.o
INCLUDES = struct.h packets.h defs.h copyright.h bitmaps.h data.h\
oldbitmaps.h tngbitmaps.h hullbitmaps.h rabbitbitmaps.h\
sound.h audio.h litebitmaps.h copyright2.h Wlib.h\
playerlist.h version.h moobitmaps.h\
parsemeta.h spopt.h map.h string_util.h wtext.h local.h
all: netrek.exe
OBJS = $(ROBJ) $(MAINOBJ) $(RSAOBJ) $(INPUTOBJ) $(WIN32_OBJS)
.c.o:
$(cc) $(cflags) $(ccompileonly) $(cdebug) $(DEFS) $(RSADEFS) $(DEBUGDEFS) $(INCS) $<
#RESOURCES = bccnetrek.res
#$(RESOURCES): bccnetrek.rc
# $(rc) bccnetrek.rc
netrek.exe: $(OBJS) $(RESOURCES) main.ico
$(link) $(ldebug) $(LIBOPTS) $(OBJS) $(LIBS) $(RESOURCES)
clean:
rm *.o
rm netrek.exe netrek.ilc netrek.ild netrek.ild netrek.ilf netrek.ils netrek.map bccnetrek.res netrek.tds
Index: sound.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/sound.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- sound.c 22 Feb 2007 05:18:18 -0000 1.26
+++ sound.c 23 Feb 2007 13:43:57 -0000 1.27
@@ -283,7 +283,7 @@
if ((channel = Mix_PlayChannel(-1, newsounds[type], 0)) < 0)
{
-#if DEBUG
+#ifdef DEBUG
/* Frequent occurence is more than 16 channels playing sound */
LineToConsole("Mix_PlayChannel: %s\n", Mix_GetError());
#endif
@@ -330,7 +330,7 @@
if ((channel = Mix_PlayChannel(-1, newsounds[type], 0)) < 0)
{
-#if DEBUG
+#ifdef DEBUG
/* Frequent occurence is more than 16 channels playing sound */
LineToConsole("Mix_PlayChannel: %s\n", Mix_GetError());
#endif
Index: map.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/map.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- map.c 22 Feb 2007 17:59:00 -0000 1.23
+++ map.c 23 Feb 2007 13:43:56 -0000 1.24
@@ -484,7 +484,7 @@
#ifdef BEEPLITE
if (useLite && emph_planet_seq_n[l->pl_no] > 0)
{
- int seq_n = (emph_planet_seq_n[l->pl_no] * 10 / fps) % emph_planet_seq_frames;
+ int seq_n = (emph_planet_seq_n[l->pl_no] * 10 / server_ups) % emph_planet_seq_frames;
if (planetBitmapGalaxy == 3)
{
@@ -903,7 +903,7 @@
if ((useLite && emph_player_seq_n[i] > 0)
&& (liteflag & LITE_PLAYERS_MAP))
{
- int seq_n = (emph_player_seq_n[i] * 10 / fps) % emph_player_seq_frames;
+ int seq_n = (emph_player_seq_n[i] * 10 / server_ups) % emph_player_seq_frames;
W_WriteBitmap(dx - (emph_player_seq_width / 2 - 1),
dy - (emph_player_seq_height / 2 + 1),
Index: input.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/input.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- input.c 11 Feb 2007 03:20:58 -0000 1.20
+++ input.c 23 Feb 2007 13:43:56 -0000 1.21
@@ -33,9 +33,11 @@
#endif
#ifdef __BORLANDC__
+#ifndef CYGWIN
// #pragma warn -rvl //Turon off "parameter never used..." warning
// #pragma warn -pro //Turon off "parameter never used..." warning
#endif
+#endif
int detallow = 1; /* flag used to figure out
* if we're allowing det */
Index: local.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- local.c 22 Feb 2007 19:34:44 -0000 1.55
+++ local.c 23 Feb 2007 13:43:56 -0000 1.56
@@ -401,7 +401,7 @@
}
else // Unknown planet
{
- j = planet_frame * 10 / fps;
+ j = planet_frame * 10 / server_ups;
if ((j >= CPLANET_VIEWS - 1) || (j < 0))
{
j = 0;
@@ -717,7 +717,7 @@
dx = dx / SCALE + WINSIDE / 2;
dy = dy / SCALE + WINSIDE / 2;
- cloak_phases = CLOAK_PHASES * fps / 10;
+ cloak_phases = CLOAK_PHASES * server_ups / 10;
if (j->p_flags & PFCLOAK)
{
if (j->p_cloakphase < (cloak_phases - 1))
@@ -1037,7 +1037,7 @@
if ((useLite && emph_player_seq_n[j->p_no] > 0)
&& (liteflag & LITE_PLAYERS_LOCAL))
{
- int seq_n = (emph_player_seq_n[j->p_no] * 10 / fps) % emph_player_seql_frames;
+ int seq_n = (emph_player_seq_n[j->p_no] * 10 / server_ups) % emph_player_seql_frames;
W_WriteBitmap (dx - (emph_player_seql_width / 2),
dy - (emph_player_seql_height / 2),
emph_player_seql[seq_n],
@@ -1326,7 +1326,7 @@
{
int i;
- i = j->p_explode * 10 / fps;
+ i = j->p_explode * 10 / server_ups;
#ifdef SOUND
if (j->p_explode == 1)
@@ -1580,7 +1580,7 @@
break;
}
ph_col += (100/j->p_ship.s_phaserfuse/updatesPerSec);
- scaled_ph_col = ph_col * 10 / fps;
+ scaled_ph_col = ph_col * 10 / server_ups;
if (phaserShrinkStyle == 1)
{
get_shrink_phaser_coords(&new_dx, &new_dy,
@@ -1910,8 +1910,8 @@
if (k->t_status == TEXPLODE)
{
k->t_fuse--;
- bmp_torpdet_frames = BMP_TORPDET_FRAMES * fps / 10;
- frame = k->t_fuse * 10 / fps;
+ bmp_torpdet_frames = BMP_TORPDET_FRAMES * server_ups / 10;
+ frame = k->t_fuse * 10 / server_ups;
if (k->t_fuse <= 0)
{
k->t_status = TFREE;
@@ -2009,8 +2009,8 @@
{
k->t_fuse++;
- bmp_torp_frames = BMP_TORP_FRAMES * fps / 10;
- frame = k->t_fuse * 10 / fps;
+ bmp_torp_frames = BMP_TORP_FRAMES * server_ups / 10;
+ frame = k->t_fuse * 10 / server_ups;
if ((k->t_fuse >= bmp_torp_frames - 1) || (k->t_fuse < 0))
k->t_fuse = 0;
@@ -2179,8 +2179,8 @@
if (pt->pt_status == PTEXPLODE)
{
pt->pt_fuse--;
- bmp_torpdet_frames = BMP_TORPDET_FRAMES * fps / 10;
- frame = pt->pt_fuse * 10 / fps;
+ bmp_torpdet_frames = BMP_TORPDET_FRAMES * server_ups / 10;
+ frame = pt->pt_fuse * 10 / server_ups;
if (pt->pt_fuse <= 0)
{
pt->pt_status = PTFREE;
@@ -2279,8 +2279,8 @@
{
pt->pt_fuse++;
- bmp_torp_frames = BMP_TORP_FRAMES * fps / 10;
- frame = pt->pt_fuse * 10 / fps;
+ bmp_torp_frames = BMP_TORP_FRAMES * server_ups / 10;
+ frame = pt->pt_fuse * 10 / server_ups;
if ((pt->pt_fuse >= bmp_torp_frames - 1) || (pt->pt_fuse < 0))
pt->pt_fuse = 0;
Index: makefile
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/makefile,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- makefile 12 Jun 2006 14:10:31 -0000 1.11
+++ makefile 23 Feb 2007 13:43:56 -0000 1.12
@@ -2,7 +2,7 @@
# This makefile is written for Borland C++ 5.5
#
-#DEBUG = 1
+DEBUG = 1
RSA = 1
# Borland C++ 5.5
Index: short.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/short.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- short.c 22 Feb 2007 19:34:44 -0000 1.12
+++ short.c 23 Feb 2007 13:43:57 -0000 1.13
@@ -273,7 +273,7 @@
thetorp = &torps[((unsigned char) *which * 8)];
for (shift = 0, i = 0; i < 8; i++, thetorp++, bitset >>= 1)
{
- thetorp->t_updateFuse = TORP_UPDATE_FUSE * fps / 10;
+ thetorp->t_updateFuse = TORP_UPDATE_FUSE * server_ups / 10;
if (bitset & 01)
{
@@ -998,7 +998,7 @@
for (shift = 0, i = 0; i < 8;
thetorp++, *bitset >>= 1, *infobitset >>= 1, i++)
{
- thetorp->t_updateFuse = TORP_UPDATE_FUSE * fps / 10;
+ thetorp->t_updateFuse = TORP_UPDATE_FUSE * server_ups / 10;
if (*bitset & 01)
{
@@ -1094,7 +1094,7 @@
thetorp->t_status = status;
if (thetorp->t_status == TEXPLODE)
{
- thetorp->t_fuse = BMP_TORPDET_FRAMES * fps / 10;
+ thetorp->t_fuse = BMP_TORPDET_FRAMES * server_ups / 10;
}
}
} /* if */
@@ -2003,7 +2003,7 @@
phas->ph_y = y;
phas->ph_target = (short) target;
phas->ph_fuse = 0;
- phas->ph_updateFuse = PHASER_UPDATE_FUSE * fps / 10;
+ phas->ph_updateFuse = PHASER_UPDATE_FUSE * server_ups / 10;
phas->ph_maxfuse = (players[pnum].p_ship.s_phaserfuse * updatesPerSec) / 10;
#ifdef ROTATERACE
Index: winmain.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/winmain.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- winmain.c 21 Apr 2006 12:00:07 -0000 1.3
+++ winmain.c 23 Feb 2007 13:43:57 -0000 1.4
@@ -22,6 +22,7 @@
#include <pwd.h>
#include <math.h>
#include <process.h>
+#include <errno.h>
#include "Wlib.h"
#include "defs.h"
Index: option.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/option.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- option.c 21 Feb 2007 15:17:07 -0000 1.26
+++ option.c 23 Feb 2007 13:43:56 -0000 1.27
@@ -214,7 +214,7 @@
/* updates: use of the int range thing... */
-struct int_range updates_range = { 1, 10, 1 };
+struct int_range updates_range = { 1, 50, 1 };
struct int_range redraw_updates_range = { 0, 5, 1 };
struct int_range phaserShrinkRng = { 0, 16, 1 };
Index: reserved.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/reserved.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- reserved.c 7 May 2006 16:59:27 -0000 1.3
+++ reserved.c 23 Feb 2007 13:43:57 -0000 1.4
@@ -5,6 +5,7 @@
#include "copyright2.h"
#include <stdio.h>
#include <sys/types.h>
+#include <winsock.h>
#include "Wlib.h"
#include "defs.h"
#include "struct.h"
Index: data.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- data.c 22 Feb 2007 16:22:13 -0000 1.51
+++ data.c 23 Feb 2007 13:43:56 -0000 1.52
@@ -228,7 +228,9 @@
#endif
-int updatesPerSec = 10;
+int updatesPerSec = 50; /* client requested updates per second */
+int server_ups = 50; /* server responded updates per second */
+int server_fps = 50; /* server configured frames per second */
#ifdef META
/* Metaservers list - comma delimited */
@@ -680,8 +682,6 @@
int portSwap = 0;
#endif
-int fps = 10;
-
// Load Ship Bitmaps from .BMP files
char *fed_ship_bmp;
char *rom_ship_bmp;
Index: feature.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/feature.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- feature.c 23 Feb 2007 02:03:30 -0000 1.6
+++ feature.c 23 Feb 2007 13:43:56 -0000 1.7
@@ -164,6 +164,18 @@
break;
}
}
+ if (strcmpi (packet->name, "FPS") == 0 && value != -1)
+ {
+ server_fps = updatesPerSec = server_ups = value;
+ LineToConsole("Server capable of computing %d frames per second.\n", value);
+ return;
+ }
+ if (strcmpi(packet->name, "UPS") == 0 && value != -1) {
+ updatesPerSec = server_ups = value;
+ LineToConsole("Server actually sending %d updates per second.\n", value);
+ return;
+ }
+
if (features[i].name == 0)
{
LineToConsole ("Feature %s from server unknown to client!\n", packet->name);
@@ -171,11 +183,6 @@
/* special cases: */
if (strcmpi (packet->name, "FEATURE_PACKETS") == 0)
reportFeatures ();
- if (strcmpi (packet->name, "FPS") == 0 && value != -1)
- {
- fps = value;
- LineToConsole("Server plans to send at %d frames per second.\n", fps);
- }
if ((strcmpi (packet->name, "RC_DISTRESS") == 0) && gen_distress)
distmacro = dist_prefered;
Index: beeplite.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/beeplite.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- beeplite.c 22 Feb 2007 17:59:00 -0000 1.12
+++ beeplite.c 23 Feb 2007 13:43:56 -0000 1.13
@@ -58,7 +58,7 @@
void liteplanet(struct planet *l)
{
- beep_lite_cycle_time_planet = 10 * fps / 10;
+ beep_lite_cycle_time_planet = 10 * server_ups / 10;
emph_planet_seq_n[l->pl_no] = beep_lite_cycle_time_planet;
l->pl_flags |= PLREDRAW; /* Leave redraw on until * *
* done highlighting */
@@ -73,7 +73,7 @@
redrawPlayer[j->p_no] = 1;
- beep_lite_cycle_time_player = 10 * fps / 10;
+ beep_lite_cycle_time_player = 10 * server_ups / 10;
emph_player_seq_n[j->p_no] = beep_lite_cycle_time_player;
}
@@ -81,7 +81,7 @@
/* small permutation on makedistress. Searches for the highliting *
* arguments, ignores everything else. */
-makelite(struct distress * dist, char *pm)
+int makelite(struct distress * dist, char *pm)
/* the info */
/* macro to parse, used for distress and macro */
{
@@ -298,7 +298,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 * fps / 10;
+ tts_timer = tts_time * server_ups / 10;
}
break;
Index: parsemeta.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/parsemeta.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- parsemeta.c 12 Feb 2007 06:49:46 -0000 1.30
+++ parsemeta.c 23 Feb 2007 13:43:56 -0000 1.31
@@ -1977,8 +1977,10 @@
// wait in periods of maximum 250ms. Better for menu responsiveness ;-)
if (waittime > 250) waittime = 250;
+#ifndef CYGWIN
readfds.fd_count = 1;
readfds.fd_array[0] = s;
+#endif
Timeout.tv_sec = waittime / 1000;
Timeout.tv_usec = waittime % 1000;
Index: socket.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/socket.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- socket.c 22 Feb 2007 19:34:44 -0000 1.16
+++ socket.c 23 Feb 2007 13:43:57 -0000 1.17
@@ -1098,7 +1098,7 @@
thetorp->t_x = ntohl (packet->x);
thetorp->t_y = ntohl (packet->y);
thetorp->t_dir = packet->dir;
- thetorp->t_updateFuse = TORP_UPDATE_FUSE * fps / 10;
+ thetorp->t_updateFuse = TORP_UPDATE_FUSE * server_ups / 10;
#ifdef ROTATERACE
@@ -1126,7 +1126,7 @@
weaponUpdate = 1;
thetorp = &torps[ntohs (packet->tnum)];
- thetorp->t_updateFuse = TORP_UPDATE_FUSE * fps / 10;
+ thetorp->t_updateFuse = TORP_UPDATE_FUSE * server_ups / 10;
if (packet->status == TEXPLODE && thetorp->t_status == TFREE)
{
@@ -1158,7 +1158,7 @@
thetorp->t_status = packet->status;
if (thetorp->t_status == TEXPLODE)
{
- thetorp->t_fuse = BMP_TORPDET_FRAMES * fps / 10;
+ thetorp->t_fuse = BMP_TORPDET_FRAMES * server_ups / 10;
}
}
}
@@ -1608,7 +1608,7 @@
phas->ph_y = ntohl (packet->y);
phas->ph_target = (short) (ntohl (packet->target));
phas->ph_fuse = 0; /* NEW */
- phas->ph_updateFuse = PHASER_UPDATE_FUSE * fps / 10;
+ phas->ph_updateFuse = PHASER_UPDATE_FUSE * server_ups / 10;
/* normalized maxfuse */
phas->ph_maxfuse = (players[packet->pnum].p_ship.s_phaserfuse * updatesPerSec) / 10;
@@ -1757,7 +1757,7 @@
weaponUpdate = 1;
thetorp = &plasmatorps[ntohs (packet->pnum)];
- thetorp->pt_updateFuse = PLASMA_UPDATE_FUSE * fps / 10;
+ thetorp->pt_updateFuse = PLASMA_UPDATE_FUSE * server_ups / 10;
if (packet->status == PTEXPLODE && thetorp->pt_status == PTFREE)
{
/* FAT: redundant explosion; don't update p_nplasmatorp */
@@ -1778,7 +1778,7 @@
thetorp->pt_status = packet->status;
if (thetorp->pt_status == PTEXPLODE)
{
- thetorp->pt_fuse = BMP_TORPDET_FRAMES * fps / 10;
+ thetorp->pt_fuse = BMP_TORPDET_FRAMES * server_ups / 10;
}
}
}
@@ -1800,7 +1800,7 @@
thetorp = &plasmatorps[ntohs (packet->pnum)];
thetorp->pt_x = ntohl (packet->x);
thetorp->pt_y = ntohl (packet->y);
- thetorp->pt_updateFuse = PLASMA_UPDATE_FUSE * fps / 10;
+ thetorp->pt_updateFuse = PLASMA_UPDATE_FUSE * server_ups / 10;
#ifdef ROTATERACE
if (rotate)
Index: defaults.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- defaults.c 21 Feb 2007 15:17:05 -0000 1.42
+++ defaults.c 23 Feb 2007 13:43:56 -0000 1.43
@@ -776,8 +776,8 @@
},
{"updatesPerSec", &updatesPerSec, RC_INT,
{
- "How much updates to send/receive",
- "1-10 range",
+ "How many updates per second to request",
+ "1-50 range",
NULL
}
},
@@ -1372,6 +1372,7 @@
}
#ifndef __BORLANDC__
+#ifndef CYGWIN
/******************************************************************************/
/*** strncmpi() ***/
/*** grr... are you telling me this sort of function isn't in the std ***/
@@ -1410,6 +1411,7 @@
return (0);
}
#endif
+#endif
/******************************************************************************/
/*** stringDefault() ***/