mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 14:42:13 +00:00
Tweeked stepheight a little, added 'cmd efpslist'
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2536 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
c0362839de
commit
c948d25a9a
3 changed files with 53 additions and 1 deletions
|
@ -289,6 +289,7 @@ typedef struct
|
||||||
// reply
|
// reply
|
||||||
double senttime;
|
double senttime;
|
||||||
float ping_time;
|
float ping_time;
|
||||||
|
int move_msecs;
|
||||||
packet_entities_t entities; //must come last (mvd states are bigger)
|
packet_entities_t entities; //must come last (mvd states are bigger)
|
||||||
} client_frame_t;
|
} client_frame_t;
|
||||||
|
|
||||||
|
|
|
@ -2031,6 +2031,9 @@ void SV_SetMoveVars(void)
|
||||||
movevars.friction = sv_friction.value;
|
movevars.friction = sv_friction.value;
|
||||||
movevars.waterfriction = sv_waterfriction.value;
|
movevars.waterfriction = sv_waterfriction.value;
|
||||||
movevars.entgravity = 1.0;
|
movevars.entgravity = 1.0;
|
||||||
|
if (*pm_stepheight.string)
|
||||||
movevars.stepheight = pm_stepheight.value;
|
movevars.stepheight = pm_stepheight.value;
|
||||||
|
else
|
||||||
|
movevars.stepheight = PM_DEFAULTSTEPHEIGHT;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -3288,6 +3288,49 @@ void Cmd_Observe_f (void)
|
||||||
host_client->sendinfo = true;
|
host_client->sendinfo = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Cmd_FPSList_f(void)
|
||||||
|
{
|
||||||
|
client_t *cl;
|
||||||
|
int c;
|
||||||
|
int f;
|
||||||
|
double minf, maxf, this;
|
||||||
|
double ftime;
|
||||||
|
int frames;
|
||||||
|
|
||||||
|
|
||||||
|
for (c = 0; c < sv.allocated_client_slots; c++)
|
||||||
|
{
|
||||||
|
cl = &svs.clients[c];
|
||||||
|
ftime = 0;
|
||||||
|
frames = 0;
|
||||||
|
|
||||||
|
if (!cl->state)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (cl->frameunion.frames)
|
||||||
|
{
|
||||||
|
for (f = 0; f < UPDATE_BACKUP; f++)
|
||||||
|
{
|
||||||
|
if (cl->frameunion.frames[f].move_msecs >= 0)
|
||||||
|
{
|
||||||
|
this = 1000.0f/cl->frameunion.frames[f].move_msecs;
|
||||||
|
ftime += this;
|
||||||
|
if (minf < this)
|
||||||
|
minf = this;
|
||||||
|
if (maxf > this)
|
||||||
|
maxf = this;
|
||||||
|
frames++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (frames)
|
||||||
|
Con_Printf("%s: %ffps (min%f max %f\n", cl->name, ftime/frames, minf, maxf);
|
||||||
|
else
|
||||||
|
Con_Printf("%s: no information available\n", cl->name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void SV_EnableClientsCSQC(void)
|
void SV_EnableClientsCSQC(void)
|
||||||
{
|
{
|
||||||
#ifdef PEXT_CSQC
|
#ifdef PEXT_CSQC
|
||||||
|
@ -3358,6 +3401,7 @@ ucmd_t ucmds[] =
|
||||||
{"topten", Rank_ListTop10_f},
|
{"topten", Rank_ListTop10_f},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
{"efpslist", Cmd_FPSList_f}, //don't conflict with the ktpro one
|
||||||
{"god", Cmd_God_f},
|
{"god", Cmd_God_f},
|
||||||
{"give", Cmd_Give_f},
|
{"give", Cmd_Give_f},
|
||||||
{"noclip", Cmd_Noclip_f},
|
{"noclip", Cmd_Noclip_f},
|
||||||
|
@ -4770,6 +4814,7 @@ void SV_ExecuteClientMessage (client_t *cl)
|
||||||
{ //split screen doesn't always have frames.
|
{ //split screen doesn't always have frames.
|
||||||
cl->frameunion.frames[cl->netchan.outgoing_sequence & UPDATE_MASK].senttime = realtime;
|
cl->frameunion.frames[cl->netchan.outgoing_sequence & UPDATE_MASK].senttime = realtime;
|
||||||
cl->frameunion.frames[cl->netchan.outgoing_sequence & UPDATE_MASK].ping_time = -1;
|
cl->frameunion.frames[cl->netchan.outgoing_sequence & UPDATE_MASK].ping_time = -1;
|
||||||
|
cl->frameunion.frames[cl->netchan.outgoing_sequence & UPDATE_MASK].move_msecs = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
host_client = cl;
|
host_client = cl;
|
||||||
|
@ -4831,6 +4876,9 @@ haveannothergo:
|
||||||
MSG_ReadDeltaUsercmd (&oldest, &oldcmd);
|
MSG_ReadDeltaUsercmd (&oldest, &oldcmd);
|
||||||
MSG_ReadDeltaUsercmd (&oldcmd, &newcmd);
|
MSG_ReadDeltaUsercmd (&oldcmd, &newcmd);
|
||||||
|
|
||||||
|
if (cl->frameunion.frames)
|
||||||
|
cl->frameunion.frames[cl->netchan.outgoing_sequence&UPDATE_MASK].move_msecs = newcmd.msec;
|
||||||
|
|
||||||
if ( cl->state == cs_spawned )
|
if ( cl->state == cs_spawned )
|
||||||
{
|
{
|
||||||
if (split == cl)
|
if (split == cl)
|
||||||
|
|
Loading…
Reference in a new issue