fix recent prediction issue.

added current bandwidth info to the status command. added cl_status command for similar things for client stuff.
minping delays now using floats instead of milliseconds.
fix waterjump bug with qc player physics.
fix flymode friction.
fixed illegible server message with ezquake going through portals. rendering is still ugly, but at least it can be used.


git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4708 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2014-07-02 03:20:40 +00:00
parent 433c7b24c8
commit 4d7cc67ebe
18 changed files with 179 additions and 64 deletions

View file

@ -3388,6 +3388,14 @@ void CL_CrashMeEndgame_f(void)
Host_EndGame("crashme!"); Host_EndGame("crashme!");
} }
void CL_Status_f(void)
{
float pi, po, bi, bo;
NET_PrintAddresses(cls.sockets);
if (NET_GetRates(cls.sockets, &pi, &po, &bi, &bo))
Con_Printf("packets,bytes/sec: in: %g %g out: %g %g\n", pi, bi, po, bo); //not relevent as a limit.
}
void CL_Skygroup_f(void); void CL_Skygroup_f(void);
/* /*
================= =================
@ -3607,6 +3615,7 @@ void CL_Init (void)
Cmd_AddCommand ("skins", Skin_Skins_f); Cmd_AddCommand ("skins", Skin_Skins_f);
Cmd_AddCommand ("allskins", Skin_AllSkins_f); Cmd_AddCommand ("allskins", Skin_AllSkins_f);
Cmd_AddCommand ("cl_status", CL_Status_f);
Cmd_AddCommand ("quit", CL_Quit_f); Cmd_AddCommand ("quit", CL_Quit_f);
Cmd_AddCommandD ("connect", CL_Connect_f, "connect scheme://address:port\nConnect to a server. Use a scheme of tcp:// or tls:// to connect via non-udp protocols." Cmd_AddCommandD ("connect", CL_Connect_f, "connect scheme://address:port\nConnect to a server. Use a scheme of tcp:// or tls:// to connect via non-udp protocols."

View file

@ -460,7 +460,7 @@ int QDECL main(int argc, char **argv)
{ {
float time, newtime, oldtime; float time, newtime, oldtime;
quakeparms_t parms; quakeparms_t parms;
int delay = 1; float delay = 0.001;
memset(&parms, 0, sizeof(parms)); memset(&parms, 0, sizeof(parms));
@ -497,7 +497,7 @@ int QDECL main(int argc, char **argv)
time = newtime - oldtime; time = newtime - oldtime;
oldtime = newtime; oldtime = newtime;
delay = SV_Frame()*1000; delay = SV_Frame();
} }
else else
#endif #endif

View file

@ -3055,7 +3055,7 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin
double time, oldtime, newtime; double time, oldtime, newtime;
char cwd[1024], bindir[1024]; char cwd[1024], bindir[1024];
const char *qtvfile = NULL; const char *qtvfile = NULL;
int delay = 0; float delay = 0;
char lang[32]; char lang[32];
char ctry[32]; char ctry[32];
int c; int c;
@ -3308,7 +3308,7 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin
#ifndef CLIENTONLY #ifndef CLIENTONLY
if (isDedicated) //compleate denial to switch to anything else - many of the client structures are not initialized. if (isDedicated) //compleate denial to switch to anything else - many of the client structures are not initialized.
{ {
int delay; float delay;
SV_Init (&parms); SV_Init (&parms);
@ -3381,7 +3381,7 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin
time = newtime - oldtime; time = newtime - oldtime;
oldtime = newtime; oldtime = newtime;
delay = 1000*SV_Frame (); delay = SV_Frame ();
#else #else
Sys_Error("wut?"); Sys_Error("wut?");
#endif #endif

View file

@ -1306,7 +1306,7 @@ int QCLibEditor(pubprogfuncs_t *prfncs, char *filename, int line, int statement,
IN_Commands (); IN_Commands ();
S_ExtraUpdate(); S_ExtraUpdate();
NET_Sleep(20, false); //any os. NET_Sleep(20/1000.0, false); //any os.
} }
realtime = oldrealtime; realtime = oldrealtime;

View file

@ -92,6 +92,7 @@ qboolean NET_WasSpecialPacket(netsrc_t netsrc);
void NET_CloseServer (void); void NET_CloseServer (void);
void UDP_CloseSocket (int socket); void UDP_CloseSocket (int socket);
void NET_Shutdown (void); void NET_Shutdown (void);
qboolean NET_GetRates(struct ftenet_connections_s *collection, float *pi, float *po, float *bi, float *bo);
int NET_GetPacket (netsrc_t netsrc, int firstsock); int NET_GetPacket (netsrc_t netsrc, int firstsock);
qboolean NET_SendPacket (netsrc_t socket, int length, const void *data, netadr_t *to); qboolean NET_SendPacket (netsrc_t socket, int length, const void *data, netadr_t *to);
int NET_LocalAddressForRemote(struct ftenet_connections_s *collection, netadr_t *remote, netadr_t *local, int idx); int NET_LocalAddressForRemote(struct ftenet_connections_s *collection, netadr_t *remote, netadr_t *local, int idx);
@ -278,4 +279,4 @@ int UDP6_OpenSocket (int port, qboolean bcast);
int IPX_OpenSocket (int port, qboolean bcast); int IPX_OpenSocket (int port, qboolean bcast);
int NetadrToSockadr (netadr_t *a, struct sockaddr_qstorage *s); int NetadrToSockadr (netadr_t *a, struct sockaddr_qstorage *s);
void SockadrToNetadr (struct sockaddr_qstorage *s, netadr_t *a); void SockadrToNetadr (struct sockaddr_qstorage *s, netadr_t *a);
qboolean NET_Sleep(int msec, qboolean stdinissocket); qboolean NET_Sleep(float seconds, qboolean stdinissocket);

View file

@ -4723,11 +4723,23 @@ static ftenet_generic_connection_t *FTENET_WebSocket_EstablishConnection(qboolea
} }
#endif #endif
qboolean NET_GetRates(ftenet_connections_t *collection, float *pi, float *po, float *bi, float *bo)
{
if (!collection)
return false;
*pi = collection->packetsinrate;
*po = collection->packetsoutrate;
*bi = collection->bytesinrate;
*bo = collection->bytesoutrate;
return true;
}
/*firstsock is a cookie*/ /*firstsock is a cookie*/
int NET_GetPacket (netsrc_t netsrc, int firstsock) int NET_GetPacket (netsrc_t netsrc, int firstsock)
{ {
ftenet_connections_t *collection; ftenet_connections_t *collection;
unsigned int ctime;
if (netsrc == NS_SERVER) if (netsrc == NS_SERVER)
{ {
#ifdef CLIENTONLY #ifdef CLIENTONLY
@ -4762,6 +4774,8 @@ int NET_GetPacket (netsrc_t netsrc, int firstsock)
continue; continue;
} }
collection->bytesin += net_message.cursize;
collection->packetsin += 1;
net_from.connum = firstsock+1; net_from.connum = firstsock+1;
return firstsock; return firstsock;
} }
@ -4769,6 +4783,21 @@ int NET_GetPacket (netsrc_t netsrc, int firstsock)
firstsock += 1; firstsock += 1;
} }
ctime = Sys_Milliseconds();
if ((ctime - collection->timemark) > 1000)
{
float secs = (ctime - collection->timemark) / 1000.0f;
collection->packetsinrate = collection->packetsin * secs;
collection->packetsoutrate = collection->packetsout * secs;
collection->bytesinrate = collection->bytesin * secs;
collection->bytesoutrate = collection->bytesout * secs;
collection->packetsin = 0;
collection->packetsout = 0;
collection->bytesin = 0;
collection->bytesout = 0;
collection->timemark = ctime;
}
return -1; return -1;
} }
@ -4818,14 +4847,22 @@ qboolean NET_SendPacket (netsrc_t netsrc, int length, const void *data, netadr_t
if (net_fakeloss.value) if (net_fakeloss.value)
{ {
if (frandom () < net_fakeloss.value) if (frandom () < net_fakeloss.value)
{
collection->bytesout += length;
collection->packetsout += 1;
return true; return true;
}
} }
if (to->connum) if (to->connum)
{ {
if (collection->conn[to->connum-1]) if (collection->conn[to->connum-1])
if (collection->conn[to->connum-1]->SendPacket(collection->conn[to->connum-1], length, data, to)) if (collection->conn[to->connum-1]->SendPacket(collection->conn[to->connum-1], length, data, to))
{
collection->bytesout += length;
collection->packetsout += 1;
return true; return true;
}
} }
for (i = 0; i < MAX_CONNECTIONS; i++) for (i = 0; i < MAX_CONNECTIONS; i++)
@ -4833,7 +4870,11 @@ qboolean NET_SendPacket (netsrc_t netsrc, int length, const void *data, netadr_t
if (!collection->conn[i]) if (!collection->conn[i])
continue; continue;
if (collection->conn[i]->SendPacket(collection->conn[i], length, data, to)) if (collection->conn[i]->SendPacket(collection->conn[i], length, data, to))
{
collection->bytesout += length;
collection->packetsout += 1;
return true; return true;
}
} }
// Con_Printf("No route to %s - try reconnecting\n", NET_AdrToString(buffer, sizeof(buffer), to)); // Con_Printf("No route to %s - try reconnecting\n", NET_AdrToString(buffer, sizeof(buffer), to));
@ -5261,13 +5302,14 @@ void IPX_CloseSocket (int socket)
//stdin can sometimes be a socket. As a result, //stdin can sometimes be a socket. As a result,
//we give the option to select it for nice console imput with timeouts. //we give the option to select it for nice console imput with timeouts.
#ifndef CLIENTONLY #ifndef CLIENTONLY
qboolean NET_Sleep(int msec, qboolean stdinissocket) qboolean NET_Sleep(float seconds, qboolean stdinissocket)
{ {
#ifdef HAVE_PACKET #ifdef HAVE_PACKET
struct timeval timeout; struct timeval timeout;
fd_set fdset; fd_set fdset;
int maxfd; int maxfd;
int con, sock; int con, sock;
unsigned int usec;
FD_ZERO(&fdset); FD_ZERO(&fdset);
@ -5298,10 +5340,14 @@ qboolean NET_Sleep(int msec, qboolean stdinissocket)
} }
} }
timeout.tv_sec = msec/1000; if (seconds > 4000) //realy? oh well.
timeout.tv_usec = (msec%1000)*1000; seconds = 4000;
usec = seconds*1000*1000;
usec += 1000; //slight extra delay, to ensure we don't wake up with nothing to do.
timeout.tv_sec = usec/(1000*1000);
timeout.tv_usec = usec;
if (!maxfd) if (!maxfd)
Sys_Sleep(msec/1000.0); Sys_Sleep(seconds);
else else
select(maxfd+1, &fdset, NULL, NULL, &timeout); select(maxfd+1, &fdset, NULL, NULL, &timeout);

View file

@ -275,6 +275,15 @@ typedef struct ftenet_generic_connection_s {
typedef struct ftenet_connections_s typedef struct ftenet_connections_s
{ {
qboolean islisten; qboolean islisten;
unsigned int packetsin;
unsigned int packetsout;
unsigned int bytesin;
unsigned int bytesout;
unsigned int timemark;
float packetsinrate;
float packetsoutrate;
float bytesinrate;
float bytesoutrate;
ftenet_generic_connection_t *conn[MAX_CONNECTIONS]; ftenet_generic_connection_t *conn[MAX_CONNECTIONS];
} ftenet_connections_t; } ftenet_connections_t;

View file

@ -104,7 +104,7 @@ static qboolean PM_PortalTransform(world_t *w, int portalnum, vec3_t org, vec3_t
PR_ExecuteProgram (w->progs, portal->xv->camera_transform); PR_ExecuteProgram (w->progs, portal->xv->camera_transform);
//make sure the new origin is okay for the player. back out if its invalid. //make sure the new origin is okay for the player. back out if its invalid.
if (!PM_TestPlayerPosition(G_VECTOR(OFS_RETURN))) if (!PM_TestPlayerPosition(G_VECTOR(OFS_RETURN), true))
okay = false; okay = false;
else else
{ {
@ -180,6 +180,7 @@ int PM_SlideMove (void)
float time_left; float time_left;
int blocked; int blocked;
float tookportal; float tookportal;
vec3_t start;
numbumps = 4; numbumps = 4;
@ -197,7 +198,8 @@ int PM_SlideMove (void)
for (i=0 ; i<3 ; i++) for (i=0 ; i<3 ; i++)
end[i] = pmove.origin[i] + time_left * pmove.velocity[i]; end[i] = pmove.origin[i] + time_left * pmove.velocity[i];
trace = PM_PlayerTracePortals (pmove.origin, end, MASK_PLAYERSOLID, &tookportal); VectorCopy(pmove.origin, start);
trace = PM_PlayerTracePortals (start, end, MASK_PLAYERSOLID, &tookportal);
if (tookportal) if (tookportal)
{ {
//made progress, but hit a portal //made progress, but hit a portal
@ -474,6 +476,7 @@ void PM_Friction (void)
start[0] = stop[0] = pmove.origin[0] + pmove.velocity[0]/speed*16; start[0] = stop[0] = pmove.origin[0] + pmove.velocity[0]/speed*16;
start[1] = stop[1] = pmove.origin[1] + pmove.velocity[1]/speed*16; start[1] = stop[1] = pmove.origin[1] + pmove.velocity[1]/speed*16;
//FIXME: gravitydir. //FIXME: gravitydir.
//id bug: this is a tracebox, NOT a traceline.
start[2] = pmove.origin[2] + pmove.player_mins[2]; start[2] = pmove.origin[2] + pmove.player_mins[2];
stop[2] = start[2] - 34; stop[2] = start[2] - 34;
trace = PM_PlayerTrace (start, stop, MASK_PLAYERSOLID); trace = PM_PlayerTrace (start, stop, MASK_PLAYERSOLID);
@ -1071,7 +1074,7 @@ void PM_NudgePosition (void)
base[i] = ((int)(base[i]*8)) * 0.125; base[i] = ((int)(base[i]*8)) * 0.125;
if (pmove.velocity[0] || pmove.velocity[1]) if (pmove.velocity[0] || pmove.velocity[1])
if (PM_TestPlayerPosition (pmove.origin)) if (PM_TestPlayerPosition (pmove.origin, false))
return; return;
for (z=0 ; z<=4 ; z++) for (z=0 ; z<=4 ; z++)
@ -1083,7 +1086,7 @@ void PM_NudgePosition (void)
pmove.origin[0] = base[0] + (sign[x] * 1.0/8); pmove.origin[0] = base[0] + (sign[x] * 1.0/8);
pmove.origin[1] = base[1] + (sign[y] * 1.0/8); pmove.origin[1] = base[1] + (sign[y] * 1.0/8);
pmove.origin[2] = base[2] + (sign[z] * 1.0/8); pmove.origin[2] = base[2] + (sign[z] * 1.0/8);
if (PM_TestPlayerPosition (pmove.origin)) if (PM_TestPlayerPosition (pmove.origin, false))
return; return;
} }
} }
@ -1189,6 +1192,9 @@ were contacted during the move.
*/ */
void PM_PlayerMove (float gamespeed) void PM_PlayerMove (float gamespeed)
{ {
int i;
int tmp; //for rounding
frametime = pmove.cmd.msec * 0.001*gamespeed; frametime = pmove.cmd.msec * 0.001*gamespeed;
pmove.numtouch = 0; pmove.numtouch = 0;
@ -1260,4 +1266,13 @@ void PM_PlayerMove (float gamespeed)
{ {
PM_ClipVelocity (pmove.velocity, groundplane.normal, pmove.velocity, 1); PM_ClipVelocity (pmove.velocity, groundplane.normal, pmove.velocity, 1);
} }
//round to network precision
for (i = 0; i < 3; i++)
{
tmp = floor(pmove.velocity[i]*8 + 0.5);
pmove.velocity[i] = tmp/8.0;
tmp = floor(pmove.origin[i]*8 + 0.5);
pmove.origin[i] = tmp/8.0;
}
} }

View file

@ -125,7 +125,7 @@ int PM_HullPointContents (hull_t *hull, int num, vec3_t p);
int PM_ExtraBoxContents (vec3_t p); //Peeks for HL-style water. int PM_ExtraBoxContents (vec3_t p); //Peeks for HL-style water.
int PM_PointContents (vec3_t point); int PM_PointContents (vec3_t point);
qboolean PM_TestPlayerPosition (vec3_t point); qboolean PM_TestPlayerPosition (vec3_t point, qboolean ignoreportals);
#ifndef __cplusplus #ifndef __cplusplus
struct trace_s PM_PlayerTrace (vec3_t start, vec3_t stop, unsigned int solidmask); struct trace_s PM_PlayerTrace (vec3_t start, vec3_t stop, unsigned int solidmask);
#endif #endif

View file

@ -358,7 +358,7 @@ PM_TestPlayerPosition
Returns false if the given player position is not valid (in solid) Returns false if the given player position is not valid (in solid)
================ ================
*/ */
qboolean PM_TestPlayerPosition (vec3_t pos) qboolean PM_TestPlayerPosition (vec3_t pos, qboolean ignoreportals)
{ {
int i, j; int i, j;
physent_t *pe; physent_t *pe;
@ -366,8 +366,6 @@ qboolean PM_TestPlayerPosition (vec3_t pos)
hull_t *hull; hull_t *hull;
trace_t trace; trace_t trace;
trace.allsolid = false;
for (i=0 ; i< pmove.numphysent ; i++) for (i=0 ; i< pmove.numphysent ; i++)
{ {
pe = &pmove.physents[i]; pe = &pmove.physents[i];
@ -375,38 +373,61 @@ qboolean PM_TestPlayerPosition (vec3_t pos)
if (pe->info == pmove.skipent) if (pe->info == pmove.skipent)
continue; continue;
if (pe->nonsolid || pe->isportal) if (pe->nonsolid)
continue; continue;
if (pe->forcecontentsmask && !(pe->forcecontentsmask & MASK_PLAYERSOLID)) if (pe->forcecontentsmask && !(pe->forcecontentsmask & MASK_PLAYERSOLID))
continue; continue;
// get the clipping hull // get the clipping hull
if (pe->model) if (pe->isportal)
{ {
if (!PM_TransformedHullCheck (pe->model, pos, pos, pmove.player_mins, pmove.player_maxs, &trace, pe->origin, pe->angles)) if (ignoreportals)
continue; continue;
if (trace.allsolid) //if the trace ended up inside a portal region, then its not valid.
if (pe->model)
{ {
for (j = i+1; j < pmove.numphysent && trace.allsolid; j++) if (!PM_TransformedHullCheck (pe->model, pos, pos, vec3_origin, vec3_origin, &trace, pe->origin, pe->angles))
{ continue;
pe = &pmove.physents[j];
if (pe->isportal)
PM_PortalCSG(pe, j, pmove.player_mins, pmove.player_maxs, pos, pos, &trace);
}
if (trace.allsolid) if (trace.allsolid)
return false; return false;
} }
else
{
hull = PM_HullForBox (pe->mins, pe->maxs);
VectorSubtract(pos, pe->origin, mins);
if (Q1BSP_HullPointContents(hull, mins) & MASK_PLAYERSOLID)
return false;
}
} }
else else
{ {
VectorSubtract (pe->mins, pmove.player_maxs, mins); if (pe->model)
VectorSubtract (pe->maxs, pmove.player_mins, maxs); {
hull = PM_HullForBox (mins, maxs); if (!PM_TransformedHullCheck (pe->model, pos, pos, pmove.player_mins, pmove.player_maxs, &trace, pe->origin, pe->angles))
VectorSubtract(pos, pe->origin, mins); continue;
if (trace.allsolid)
{
for (j = i+1; j < pmove.numphysent && trace.allsolid; j++)
{
pe = &pmove.physents[j];
if (pe->isportal)
PM_PortalCSG(pe, j, pmove.player_mins, pmove.player_maxs, pos, pos, &trace);
}
if (trace.allsolid)
return false;
}
}
else
{
VectorSubtract (pe->mins, pmove.player_maxs, mins);
VectorSubtract (pe->maxs, pmove.player_mins, maxs);
hull = PM_HullForBox (mins, maxs);
VectorSubtract(pos, pe->origin, mins);
if (Q1BSP_HullPointContents(hull, mins) & MASK_PLAYERSOLID) if (Q1BSP_HullPointContents(hull, mins) & MASK_PLAYERSOLID)
return false; return false;
}
} }
} }
@ -482,9 +503,10 @@ trace_t PM_PlayerTrace (vec3_t start, vec3_t end, unsigned int solidmask)
if (trace.allsolid) if (trace.allsolid)
trace.startsolid = true; trace.startsolid = true;
if (trace.startsolid && pe->isportal) if (trace.startsolid && pe->isportal)
trace.startsolid = false; trace.startsolid = false;
// if (trace.startsolid)
// trace.fraction = 0;
// did we clip the move? // did we clip the move?
if (trace.fraction < total.fraction || (trace.startsolid && !total.startsolid)) if (trace.fraction < total.fraction || (trace.startsolid && !total.startsolid))
@ -493,9 +515,11 @@ trace_t PM_PlayerTrace (vec3_t start, vec3_t end, unsigned int solidmask)
total = trace; total = trace;
total.entnum = i; total.entnum = i;
} }
} }
//this is needed to avoid *2 friction. some id bug.
if (total.startsolid)
total.fraction = 0;
return total; return total;
} }

View file

@ -166,7 +166,6 @@ Global
{2866F783-6B44-4655-A38D-D53874037454}.MRelease|Win32.Build.0 = Release|Win32 {2866F783-6B44-4655-A38D-D53874037454}.MRelease|Win32.Build.0 = Release|Win32
{2866F783-6B44-4655-A38D-D53874037454}.MRelease|x64.ActiveCfg = Debug|Win32 {2866F783-6B44-4655-A38D-D53874037454}.MRelease|x64.ActiveCfg = Debug|Win32
{2866F783-6B44-4655-A38D-D53874037454}.Release Dedicated Server|Win32.ActiveCfg = Release|Win32 {2866F783-6B44-4655-A38D-D53874037454}.Release Dedicated Server|Win32.ActiveCfg = Release|Win32
{2866F783-6B44-4655-A38D-D53874037454}.Release Dedicated Server|Win32.Build.0 = Release|Win32
{2866F783-6B44-4655-A38D-D53874037454}.Release Dedicated Server|x64.ActiveCfg = Release|Win32 {2866F783-6B44-4655-A38D-D53874037454}.Release Dedicated Server|x64.ActiveCfg = Release|Win32
{2866F783-6B44-4655-A38D-D53874037454}.Release|Win32.ActiveCfg = Release|Win32 {2866F783-6B44-4655-A38D-D53874037454}.Release|Win32.ActiveCfg = Release|Win32
{2866F783-6B44-4655-A38D-D53874037454}.Release|Win32.Build.0 = Release|Win32 {2866F783-6B44-4655-A38D-D53874037454}.Release|Win32.Build.0 = Release|Win32
@ -195,7 +194,6 @@ Global
{62669E6C-7E18-4E4D-BA54-DFBE29E7D24E}.MRelease|Win32.Build.0 = Release|Win32 {62669E6C-7E18-4E4D-BA54-DFBE29E7D24E}.MRelease|Win32.Build.0 = Release|Win32
{62669E6C-7E18-4E4D-BA54-DFBE29E7D24E}.MRelease|x64.ActiveCfg = Debug|Win32 {62669E6C-7E18-4E4D-BA54-DFBE29E7D24E}.MRelease|x64.ActiveCfg = Debug|Win32
{62669E6C-7E18-4E4D-BA54-DFBE29E7D24E}.Release Dedicated Server|Win32.ActiveCfg = Release|Win32 {62669E6C-7E18-4E4D-BA54-DFBE29E7D24E}.Release Dedicated Server|Win32.ActiveCfg = Release|Win32
{62669E6C-7E18-4E4D-BA54-DFBE29E7D24E}.Release Dedicated Server|Win32.Build.0 = Release|Win32
{62669E6C-7E18-4E4D-BA54-DFBE29E7D24E}.Release Dedicated Server|x64.ActiveCfg = Release|Win32 {62669E6C-7E18-4E4D-BA54-DFBE29E7D24E}.Release Dedicated Server|x64.ActiveCfg = Release|Win32
{62669E6C-7E18-4E4D-BA54-DFBE29E7D24E}.Release|Win32.ActiveCfg = Release|Win32 {62669E6C-7E18-4E4D-BA54-DFBE29E7D24E}.Release|Win32.ActiveCfg = Release|Win32
{62669E6C-7E18-4E4D-BA54-DFBE29E7D24E}.Release|Win32.Build.0 = Release|Win32 {62669E6C-7E18-4E4D-BA54-DFBE29E7D24E}.Release|Win32.Build.0 = Release|Win32
@ -247,7 +245,6 @@ Global
{873CCE24-3549-49D4-A4B4-653F91B1532A}.MRelease|Win32.Build.0 = Release|Win32 {873CCE24-3549-49D4-A4B4-653F91B1532A}.MRelease|Win32.Build.0 = Release|Win32
{873CCE24-3549-49D4-A4B4-653F91B1532A}.MRelease|x64.ActiveCfg = Debug|Win32 {873CCE24-3549-49D4-A4B4-653F91B1532A}.MRelease|x64.ActiveCfg = Debug|Win32
{873CCE24-3549-49D4-A4B4-653F91B1532A}.Release Dedicated Server|Win32.ActiveCfg = Release|Win32 {873CCE24-3549-49D4-A4B4-653F91B1532A}.Release Dedicated Server|Win32.ActiveCfg = Release|Win32
{873CCE24-3549-49D4-A4B4-653F91B1532A}.Release Dedicated Server|Win32.Build.0 = Release|Win32
{873CCE24-3549-49D4-A4B4-653F91B1532A}.Release Dedicated Server|x64.ActiveCfg = Release|Win32 {873CCE24-3549-49D4-A4B4-653F91B1532A}.Release Dedicated Server|x64.ActiveCfg = Release|Win32
{873CCE24-3549-49D4-A4B4-653F91B1532A}.Release|Win32.ActiveCfg = Release|Win32 {873CCE24-3549-49D4-A4B4-653F91B1532A}.Release|Win32.ActiveCfg = Release|Win32
{873CCE24-3549-49D4-A4B4-653F91B1532A}.Release|Win32.Build.0 = Release|Win32 {873CCE24-3549-49D4-A4B4-653F91B1532A}.Release|Win32.Build.0 = Release|Win32
@ -278,7 +275,6 @@ Global
{4877586B-E85B-4DF8-BCCE-59D31514D240}.MRelease|Win32.Build.0 = Release|Win32 {4877586B-E85B-4DF8-BCCE-59D31514D240}.MRelease|Win32.Build.0 = Release|Win32
{4877586B-E85B-4DF8-BCCE-59D31514D240}.MRelease|x64.ActiveCfg = Debug|Win32 {4877586B-E85B-4DF8-BCCE-59D31514D240}.MRelease|x64.ActiveCfg = Debug|Win32
{4877586B-E85B-4DF8-BCCE-59D31514D240}.Release Dedicated Server|Win32.ActiveCfg = Release|Win32 {4877586B-E85B-4DF8-BCCE-59D31514D240}.Release Dedicated Server|Win32.ActiveCfg = Release|Win32
{4877586B-E85B-4DF8-BCCE-59D31514D240}.Release Dedicated Server|Win32.Build.0 = Release|Win32
{4877586B-E85B-4DF8-BCCE-59D31514D240}.Release Dedicated Server|x64.ActiveCfg = Release|Win32 {4877586B-E85B-4DF8-BCCE-59D31514D240}.Release Dedicated Server|x64.ActiveCfg = Release|Win32
{4877586B-E85B-4DF8-BCCE-59D31514D240}.Release|Win32.ActiveCfg = Release|Win32 {4877586B-E85B-4DF8-BCCE-59D31514D240}.Release|Win32.ActiveCfg = Release|Win32
{4877586B-E85B-4DF8-BCCE-59D31514D240}.Release|Win32.Build.0 = Release|Win32 {4877586B-E85B-4DF8-BCCE-59D31514D240}.Release|Win32.Build.0 = Release|Win32
@ -309,7 +305,6 @@ Global
{32B12987-DF8C-4E40-B07C-B18586A4CA65}.MRelease|Win32.Build.0 = Release|Win32 {32B12987-DF8C-4E40-B07C-B18586A4CA65}.MRelease|Win32.Build.0 = Release|Win32
{32B12987-DF8C-4E40-B07C-B18586A4CA65}.MRelease|x64.ActiveCfg = Debug|Win32 {32B12987-DF8C-4E40-B07C-B18586A4CA65}.MRelease|x64.ActiveCfg = Debug|Win32
{32B12987-DF8C-4E40-B07C-B18586A4CA65}.Release Dedicated Server|Win32.ActiveCfg = Release|Win32 {32B12987-DF8C-4E40-B07C-B18586A4CA65}.Release Dedicated Server|Win32.ActiveCfg = Release|Win32
{32B12987-DF8C-4E40-B07C-B18586A4CA65}.Release Dedicated Server|Win32.Build.0 = Release|Win32
{32B12987-DF8C-4E40-B07C-B18586A4CA65}.Release Dedicated Server|x64.ActiveCfg = Release|Win32 {32B12987-DF8C-4E40-B07C-B18586A4CA65}.Release Dedicated Server|x64.ActiveCfg = Release|Win32
{32B12987-DF8C-4E40-B07C-B18586A4CA65}.Release|Win32.ActiveCfg = Release|Win32 {32B12987-DF8C-4E40-B07C-B18586A4CA65}.Release|Win32.ActiveCfg = Release|Win32
{32B12987-DF8C-4E40-B07C-B18586A4CA65}.Release|Win32.Build.0 = Release|Win32 {32B12987-DF8C-4E40-B07C-B18586A4CA65}.Release|Win32.Build.0 = Release|Win32
@ -337,7 +332,6 @@ Global
{4735677B-6D5A-4BE6-A945-CB32DEADBEEF}.MRelease|Win32.Build.0 = Release|Win32 {4735677B-6D5A-4BE6-A945-CB32DEADBEEF}.MRelease|Win32.Build.0 = Release|Win32
{4735677B-6D5A-4BE6-A945-CB32DEADBEEF}.MRelease|x64.ActiveCfg = Debug|Win32 {4735677B-6D5A-4BE6-A945-CB32DEADBEEF}.MRelease|x64.ActiveCfg = Debug|Win32
{4735677B-6D5A-4BE6-A945-CB32DEADBEEF}.Release Dedicated Server|Win32.ActiveCfg = Release|Win32 {4735677B-6D5A-4BE6-A945-CB32DEADBEEF}.Release Dedicated Server|Win32.ActiveCfg = Release|Win32
{4735677B-6D5A-4BE6-A945-CB32DEADBEEF}.Release Dedicated Server|Win32.Build.0 = Release|Win32
{4735677B-6D5A-4BE6-A945-CB32DEADBEEF}.Release Dedicated Server|x64.ActiveCfg = Release|Win32 {4735677B-6D5A-4BE6-A945-CB32DEADBEEF}.Release Dedicated Server|x64.ActiveCfg = Release|Win32
{4735677B-6D5A-4BE6-A945-CB32DEADBEEF}.Release|Win32.ActiveCfg = Release|Win32 {4735677B-6D5A-4BE6-A945-CB32DEADBEEF}.Release|Win32.ActiveCfg = Release|Win32
{4735677B-6D5A-4BE6-A945-CB32DEADBEEF}.Release|Win32.Build.0 = Release|Win32 {4735677B-6D5A-4BE6-A945-CB32DEADBEEF}.Release|Win32.Build.0 = Release|Win32
@ -370,7 +364,6 @@ Global
{9767E236-8454-44E9-8999-CD5BDAFBE9BA}.MRelease|Win32.Build.0 = Release|Win32 {9767E236-8454-44E9-8999-CD5BDAFBE9BA}.MRelease|Win32.Build.0 = Release|Win32
{9767E236-8454-44E9-8999-CD5BDAFBE9BA}.MRelease|x64.ActiveCfg = Release|Win32 {9767E236-8454-44E9-8999-CD5BDAFBE9BA}.MRelease|x64.ActiveCfg = Release|Win32
{9767E236-8454-44E9-8999-CD5BDAFBE9BA}.Release Dedicated Server|Win32.ActiveCfg = Release|Win32 {9767E236-8454-44E9-8999-CD5BDAFBE9BA}.Release Dedicated Server|Win32.ActiveCfg = Release|Win32
{9767E236-8454-44E9-8999-CD5BDAFBE9BA}.Release Dedicated Server|Win32.Build.0 = Release|Win32
{9767E236-8454-44E9-8999-CD5BDAFBE9BA}.Release Dedicated Server|x64.ActiveCfg = Release|Win32 {9767E236-8454-44E9-8999-CD5BDAFBE9BA}.Release Dedicated Server|x64.ActiveCfg = Release|Win32
{9767E236-8454-44E9-8999-CD5BDAFBE9BA}.Release|Win32.ActiveCfg = Release|Win32 {9767E236-8454-44E9-8999-CD5BDAFBE9BA}.Release|Win32.ActiveCfg = Release|Win32
{9767E236-8454-44E9-8999-CD5BDAFBE9BA}.Release|Win32.Build.0 = Release|Win32 {9767E236-8454-44E9-8999-CD5BDAFBE9BA}.Release|Win32.Build.0 = Release|Win32
@ -405,7 +398,6 @@ Global
{72269FEE-293D-40BC-A7AE-E429F4496869}.MRelease|Win32.Build.0 = Release|Win32 {72269FEE-293D-40BC-A7AE-E429F4496869}.MRelease|Win32.Build.0 = Release|Win32
{72269FEE-293D-40BC-A7AE-E429F4496869}.MRelease|x64.ActiveCfg = Release|Win32 {72269FEE-293D-40BC-A7AE-E429F4496869}.MRelease|x64.ActiveCfg = Release|Win32
{72269FEE-293D-40BC-A7AE-E429F4496869}.Release Dedicated Server|Win32.ActiveCfg = Release|Win32 {72269FEE-293D-40BC-A7AE-E429F4496869}.Release Dedicated Server|Win32.ActiveCfg = Release|Win32
{72269FEE-293D-40BC-A7AE-E429F4496869}.Release Dedicated Server|Win32.Build.0 = Release|Win32
{72269FEE-293D-40BC-A7AE-E429F4496869}.Release Dedicated Server|x64.ActiveCfg = Release|Win32 {72269FEE-293D-40BC-A7AE-E429F4496869}.Release Dedicated Server|x64.ActiveCfg = Release|Win32
{72269FEE-293D-40BC-A7AE-E429F4496869}.Release|Win32.ActiveCfg = Release|Win32 {72269FEE-293D-40BC-A7AE-E429F4496869}.Release|Win32.ActiveCfg = Release|Win32
{72269FEE-293D-40BC-A7AE-E429F4496869}.Release|Win32.Build.0 = Release|Win32 {72269FEE-293D-40BC-A7AE-E429F4496869}.Release|Win32.Build.0 = Release|Win32
@ -600,7 +592,6 @@ Global
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.MRelease|Win32.Build.0 = Release|Win32 {6ABD62A3-C5A0-43E8-BA4F-84606057774F}.MRelease|Win32.Build.0 = Release|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.MRelease|x64.ActiveCfg = Release|Win32 {6ABD62A3-C5A0-43E8-BA4F-84606057774F}.MRelease|x64.ActiveCfg = Release|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.Release Dedicated Server|Win32.ActiveCfg = Release|Win32 {6ABD62A3-C5A0-43E8-BA4F-84606057774F}.Release Dedicated Server|Win32.ActiveCfg = Release|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.Release Dedicated Server|Win32.Build.0 = Release|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.Release Dedicated Server|x64.ActiveCfg = Release|Win32 {6ABD62A3-C5A0-43E8-BA4F-84606057774F}.Release Dedicated Server|x64.ActiveCfg = Release|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.Release|Win32.ActiveCfg = Release|Win32 {6ABD62A3-C5A0-43E8-BA4F-84606057774F}.Release|Win32.ActiveCfg = Release|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.Release|Win32.Build.0 = Release|Win32 {6ABD62A3-C5A0-43E8-BA4F-84606057774F}.Release|Win32.Build.0 = Release|Win32
@ -636,7 +627,6 @@ Global
{74542CA7-48C1-4664-9007-66F751131EA3}.MRelease|Win32.Build.0 = Release|Win32 {74542CA7-48C1-4664-9007-66F751131EA3}.MRelease|Win32.Build.0 = Release|Win32
{74542CA7-48C1-4664-9007-66F751131EA3}.MRelease|x64.ActiveCfg = Release|Win32 {74542CA7-48C1-4664-9007-66F751131EA3}.MRelease|x64.ActiveCfg = Release|Win32
{74542CA7-48C1-4664-9007-66F751131EA3}.Release Dedicated Server|Win32.ActiveCfg = Release|Win32 {74542CA7-48C1-4664-9007-66F751131EA3}.Release Dedicated Server|Win32.ActiveCfg = Release|Win32
{74542CA7-48C1-4664-9007-66F751131EA3}.Release Dedicated Server|Win32.Build.0 = Release|Win32
{74542CA7-48C1-4664-9007-66F751131EA3}.Release Dedicated Server|x64.ActiveCfg = Release|Win32 {74542CA7-48C1-4664-9007-66F751131EA3}.Release Dedicated Server|x64.ActiveCfg = Release|Win32
{74542CA7-48C1-4664-9007-66F751131EA3}.Release|Win32.ActiveCfg = Release|Win32 {74542CA7-48C1-4664-9007-66F751131EA3}.Release|Win32.ActiveCfg = Release|Win32
{74542CA7-48C1-4664-9007-66F751131EA3}.Release|Win32.Build.0 = Release|Win32 {74542CA7-48C1-4664-9007-66F751131EA3}.Release|Win32.Build.0 = Release|Win32

View file

@ -4114,15 +4114,11 @@ static void ted_itterate(heightmap_t *hm, int distribution, float *pos, float ra
{ {
wy = (sy*(steps-1.0) + ty)*sc[1]; wy = (sy*(steps-1.0) + ty)*sc[1];
yd = wy - pos[1];// - sc[1]/4; yd = wy - pos[1];// - sc[1]/4;
// if (yd < 0)
// yd = 0;
for (tx = 0; tx < steps; tx++) for (tx = 0; tx < steps; tx++)
{ {
/*both heights and textures have an overlapping/matching sample at the edge, there's no need for any half-pixels or anything here*/ /*both heights and textures have an overlapping/matching sample at the edge, there's no need for any half-pixels or anything here*/
wx = (sx*(steps-1.0) + tx)*sc[0]; wx = (sx*(steps-1.0) + tx)*sc[0];
xd = wx - pos[0];// - sc[0]/4; xd = wx - pos[0];// - sc[0]/4;
// if (xd < 0)
// xd = 0;
switch(distribution) switch(distribution)
{ {

View file

@ -8584,10 +8584,13 @@ static void QCBUILTIN PF_runclientphys(pubprogfuncs_t *prinst, struct globalvars
else else
pmove.pm_type = PM_NORMAL; pmove.pm_type = PM_NORMAL;
pmove.jump_msec = 0;//(cls.z_ext & Z_EXT_PM_TYPE) ? 0 : from->jump_msec; pmove.jump_msec = 0;
pmove.jump_held = ((int)ent->xv->pmove_flags)&PMF_JUMP_HELD; pmove.jump_held = ((int)ent->xv->pmove_flags)&PMF_JUMP_HELD;
pmove.waterjumptime = ent->v->teleport_time; if (progstype != PROG_QW) //this is just annoying.
pmove.waterjumptime = sv_player->v->teleport_time - sv.time;
else
pmove.waterjumptime = ent->v->teleport_time;
//set up the movement command //set up the movement command
msecs = pr_global_struct->input_timelength*1000 + 0.5f; msecs = pr_global_struct->input_timelength*1000 + 0.5f;
@ -8606,12 +8609,20 @@ static void QCBUILTIN PF_runclientphys(pubprogfuncs_t *prinst, struct globalvars
VectorCopy(ent->v->velocity, pmove.velocity); VectorCopy(ent->v->velocity, pmove.velocity);
VectorCopy(ent->v->maxs, pmove.player_maxs); VectorCopy(ent->v->maxs, pmove.player_maxs);
VectorCopy(ent->v->mins, pmove.player_mins); VectorCopy(ent->v->mins, pmove.player_mins);
VectorCopy(ent->xv->gravitydir, pmove.gravitydir);
pmove.numtouch = 0;
pmove.world = &sv.world; pmove.world = &sv.world;
pmove.skipent = -1; pmove.skipent = -1;
pmove.numphysent = 1; pmove.numphysent = 1;
pmove.physents[0].model = sv.world.worldmodel; pmove.physents[0].model = sv.world.worldmodel;
pmove.onladder = false;
pmove.onground = false;
pmove.groundent = 0;
pmove.waterlevel = 0;
pmove.watertype = 0;
for (i=0 ; i<3 ; i++) for (i=0 ; i<3 ; i++)
{ {
pmove_mins[i] = pmove.origin[i] - 256; pmove_mins[i] = pmove.origin[i] - 256;
@ -8634,7 +8645,10 @@ static void QCBUILTIN PF_runclientphys(pubprogfuncs_t *prinst, struct globalvars
ent->xv->pmove_flags = 0; ent->xv->pmove_flags = 0;
ent->xv->pmove_flags += ((int)pmove.jump_held?PMF_JUMP_HELD:0); ent->xv->pmove_flags += ((int)pmove.jump_held?PMF_JUMP_HELD:0);
ent->xv->pmove_flags += ((int)pmove.onladder?PMF_LADDER:0); ent->xv->pmove_flags += ((int)pmove.onladder?PMF_LADDER:0);
ent->v->teleport_time = pmove.waterjumptime; if (progstype != PROG_QW) //this is just annoying.
sv_player->v->teleport_time = sv.time + pmove.waterjumptime;
else
ent->v->teleport_time = pmove.waterjumptime;
VectorCopy(pmove.origin, ent->v->origin); VectorCopy(pmove.origin, ent->v->origin);
VectorCopy(pmove.velocity, ent->v->velocity); VectorCopy(pmove.velocity, ent->v->velocity);

View file

@ -1624,6 +1624,7 @@ static void SV_Status_f (void)
float cpu, avg, pak; float cpu, avg, pak;
char *s; char *s;
char adr[MAX_ADR_SIZE]; char adr[MAX_ADR_SIZE];
float pi, po, bi, bo;
int columns = 80; int columns = 80;
extern cvar_t sv_listen_qw, sv_listen_nq, sv_listen_dp, sv_listen_q3; extern cvar_t sv_listen_qw, sv_listen_nq, sv_listen_dp, sv_listen_q3;
@ -1655,6 +1656,8 @@ static void SV_Status_f (void)
Con_Printf("cpu utilization : %3i%%\n",(int)cpu); Con_Printf("cpu utilization : %3i%%\n",(int)cpu);
Con_Printf("avg response time: %i ms\n",(int)avg); Con_Printf("avg response time: %i ms\n",(int)avg);
Con_Printf("packets/frame : %5.2f\n", pak); //not relevent as a limit. Con_Printf("packets/frame : %5.2f\n", pak); //not relevent as a limit.
if (NET_GetRates(svs.sockets, &pi, &po, &bi, &bo))
Con_Printf("packets,bytes/sec: in: %g %g out: %g %g\n", pi, bi, po, bo); //not relevent as a limit.
Con_Printf("server uptime : %s\n", ShowTime(realtime)); Con_Printf("server uptime : %s\n", ShowTime(realtime));
if (sv.state == ss_clustermode) if (sv.state == ss_clustermode)
return; return;

View file

@ -2525,6 +2525,6 @@ void SV_SetMoveVars(void)
movevars.entgravity = 1.0; movevars.entgravity = 1.0;
movevars.stepheight = *sv_stepheight.string?sv_stepheight.value:PM_DEFAULTSTEPHEIGHT; movevars.stepheight = *sv_stepheight.string?sv_stepheight.value:PM_DEFAULTSTEPHEIGHT;
movevars.watersinkspeed = *pm_watersinkspeed.string?pm_watersinkspeed.value:60; movevars.watersinkspeed = *pm_watersinkspeed.string?pm_watersinkspeed.value:60;
movevars.flyfriction = *pm_flyfriction.string?pm_flyfriction.value:60; movevars.flyfriction = *pm_flyfriction.string?pm_flyfriction.value:4;
} }
#endif #endif

View file

@ -681,7 +681,7 @@ main
*/ */
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
int maxsleep; float maxsleep;
quakeparms_t parms; quakeparms_t parms;
// fd_set fdset; // fd_set fdset;
// extern int net_socket; // extern int net_socket;
@ -717,7 +717,7 @@ int main(int argc, char *argv[])
SV_Init (&parms); SV_Init (&parms);
// run one frame immediately for first heartbeat // run one frame immediately for first heartbeat
maxsleep = SV_Frame()*1000; maxsleep = SV_Frame();
// //
// main loop // main loop
@ -732,7 +732,7 @@ int main(int argc, char *argv[])
stdin_ready = false; stdin_ready = false;
} }
maxsleep = SV_Frame()*1000; maxsleep = SV_Frame();
// extrasleep is just a way to generate a fucked up connection on purpose // extrasleep is just a way to generate a fucked up connection on purpose
if (sys_extrasleep.value) if (sys_extrasleep.value)

View file

@ -1192,7 +1192,7 @@ int servicecontrol;
void ServerMainLoop(void) void ServerMainLoop(void)
{ {
double newtime, time, oldtime; double newtime, time, oldtime;
int delay = 1; float delay = 0.001;
// //
// main loop // main loop
// //
@ -1205,7 +1205,7 @@ void ServerMainLoop(void)
newtime = Sys_DoubleTime (); newtime = Sys_DoubleTime ();
time = newtime - oldtime; time = newtime - oldtime;
oldtime = newtime; oldtime = newtime;
delay = SV_Frame()*1000; delay = SV_Frame();
#ifdef USESERVICE #ifdef USESERVICE
@ -1330,7 +1330,6 @@ SERVICE_TABLE_ENTRY DispatchTable[] =
}; };
#endif #endif
qboolean NET_Sleep(int msec, qboolean stdinissocket);
int main (int argc, char **argv) int main (int argc, char **argv)
{ {
#ifdef USESERVICE #ifdef USESERVICE

View file

@ -6121,9 +6121,18 @@ if (sv_player->v->health > 0 && before && !after )
if (delta[0] || delta[1] || delta[2]) if (delta[0] || delta[1] || delta[2])
{ {
client_t *cl = ClientReliableWrite_BeginSplit(host_client, svcfte_setangledelta, 7); if (host_client->fteprotocolextensions2 & PEXT2_SETANGLEDELTA)
for (i=0 ; i < 3 ; i++) {
ClientReliableWrite_Angle16 (cl, delta[i]); client_t *cl = ClientReliableWrite_BeginSplit(host_client, svcfte_setangledelta, 7);
for (i=0 ; i < 3 ; i++)
ClientReliableWrite_Angle16 (cl, delta[i]);
}
else
{
client_t *cl = ClientReliableWrite_BeginSplit(host_client, svc_setangle, 7);
for (i=0 ; i < 3 ; i++)
ClientReliableWrite_Angle (cl, pmove.angles[i]);
}
} }
} }