mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-25 05:11:35 +00:00
fix join/observe not updating spectator userinfo properly in mvds. fix a couple of other recent mvd bugs.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4422 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
4a1416a5d2
commit
c1fde0e079
7 changed files with 37 additions and 8 deletions
|
@ -86,6 +86,7 @@ Global
|
|||
{88BFEE0E-7BC0-43AD-9CCC-6B1A6E4C1364}.GLDebug|x64.ActiveCfg = GLDebug|x64
|
||||
{88BFEE0E-7BC0-43AD-9CCC-6B1A6E4C1364}.GLDebug|x64.Build.0 = GLDebug|x64
|
||||
{88BFEE0E-7BC0-43AD-9CCC-6B1A6E4C1364}.GLRelease|Win32.ActiveCfg = GLRelease|Win32
|
||||
{88BFEE0E-7BC0-43AD-9CCC-6B1A6E4C1364}.GLRelease|Win32.Build.0 = GLRelease|Win32
|
||||
{88BFEE0E-7BC0-43AD-9CCC-6B1A6E4C1364}.GLRelease|x64.ActiveCfg = GLRelease|x64
|
||||
{88BFEE0E-7BC0-43AD-9CCC-6B1A6E4C1364}.GLRelease|x64.Build.0 = GLRelease|x64
|
||||
{88BFEE0E-7BC0-43AD-9CCC-6B1A6E4C1364}.MDebug|Win32.ActiveCfg = MDebug|Win32
|
||||
|
|
|
@ -1318,6 +1318,7 @@ char *SV_Demo_CurrentOutput(void);
|
|||
void SV_MVDInit(void);
|
||||
char *SV_MVDNum(char *buffer, int bufferlen, int num);
|
||||
void SV_SendMVDMessage(void);
|
||||
void SV_MVD_WriteReliables(void);
|
||||
qboolean SV_ReadMVD (void);
|
||||
void SV_FlushDemoSignon (void);
|
||||
void DestFlush(qboolean compleate);
|
||||
|
|
|
@ -888,11 +888,12 @@ void SV_GeneratePublicUserInfo(int pext, client_t *cl, char *info, int infolengt
|
|||
|
||||
//FIXME: we should probably use some sort of priority system instead if I'm honest about it
|
||||
if (pext & PEXT_BIGUSERINFOS)
|
||||
Q_strncpyz (info, cl->userinfo, sizeof(info));
|
||||
Q_strncpyz (info, cl->userinfo, infolength);
|
||||
else
|
||||
{
|
||||
if (infolength >= BASIC_INFO_STRING)
|
||||
infolength = BASIC_INFO_STRING;
|
||||
*info = 0;
|
||||
for (i = 0; (key = Info_KeyForNumber(cl->userinfo, i)); i++)
|
||||
{
|
||||
if (!*key)
|
||||
|
@ -929,7 +930,10 @@ void SV_FullClientUpdate (client_t *client, client_t *to)
|
|||
SV_FullClientUpdate(client, &svs.clients[i]);
|
||||
}
|
||||
if (sv.mvdrecording)
|
||||
SV_FullClientUpdate(client, &demo.recorder);
|
||||
{
|
||||
SV_FullClientUpdate(client, &demo.recorder);
|
||||
SV_MVD_WriteReliables();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -757,7 +757,7 @@ void SV_MVDPings (void)
|
|||
client_t *client;
|
||||
int j;
|
||||
|
||||
for (j = 0, client = svs.clients; j < demo.recorder.max_net_ents; j++, client++)
|
||||
for (j = 0, client = svs.clients; j < demo.recorder.max_net_clients; j++, client++)
|
||||
{
|
||||
if (client->state != cs_spawned)
|
||||
continue;
|
||||
|
@ -1010,6 +1010,24 @@ void SV_WriteMVDMessage (sizebuf_t *msg, int type, int to, float time)
|
|||
DestFlush(false);
|
||||
}
|
||||
|
||||
//if you use ClientRelaible to write to demo.recorder's message buffer (for code reuse) call this function to ensure its flushed.
|
||||
void SV_MVD_WriteReliables(void)
|
||||
{
|
||||
int i;
|
||||
if (demo.recorder.netchan.message.cursize)
|
||||
{
|
||||
SV_WriteMVDMessage(&demo.recorder.netchan.message, dem_all, 0, sv.time);
|
||||
demo.recorder.netchan.message.cursize = 0;
|
||||
}
|
||||
for (i = 0; i < demo.recorder.num_backbuf; i++)
|
||||
{
|
||||
demo.recorder.backbuf.data = demo.recorder.backbuf_data[i];
|
||||
demo.recorder.backbuf.cursize = demo.recorder.backbuf_size[i];
|
||||
SV_WriteMVDMessage(&demo.recorder.backbuf, dem_all, 0, sv.time);
|
||||
demo.recorder.backbuf_size[i] = 0;
|
||||
}
|
||||
demo.recorder.backbuf.cursize = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
|
@ -1085,7 +1103,7 @@ qboolean SV_MVDWritePackets (int num)
|
|||
// find two frames
|
||||
// one before the exact time (time - msec) and one after,
|
||||
// then we can interpolte exact position for current frame
|
||||
for (i = 0, cl = frame->clients, demoinfo = demo.info; i < demo.recorder.max_net_ents ; i++, cl++, demoinfo++)
|
||||
for (i = 0, cl = frame->clients, demoinfo = demo.info; i < demo.recorder.max_net_clients ; i++, cl++, demoinfo++)
|
||||
{
|
||||
if (cl->parsecount != demo.lastwritten)
|
||||
continue; // not valid
|
||||
|
@ -1887,9 +1905,9 @@ void SV_MVD_SendInitialGamestate(mvddest_t *dest)
|
|||
|
||||
// send current status of all other players
|
||||
|
||||
for (i = 0; i < demo.recorder.max_net_ents; i++)
|
||||
for (i = 0; i < demo.recorder.max_net_clients; i++)
|
||||
{
|
||||
player = svs.clients + i;
|
||||
player = &svs.clients[i];
|
||||
|
||||
SV_MVD_FullClientUpdate(&buf, player);
|
||||
|
||||
|
|
|
@ -2572,6 +2572,8 @@ void SV_SendMVDMessage(void)
|
|||
/*figure out what the stat values should be*/
|
||||
SV_CalcClientStats(c, statsi, statsf, statss);
|
||||
|
||||
//FIXME we should do something about the packet overhead here. each MVDWrite_Begin is a separate packet!
|
||||
|
||||
for (j=0 ; j<m ; j++)
|
||||
{
|
||||
if (demo.recorder.fteprotocolextensions & PEXT_CSQC)
|
||||
|
|
|
@ -550,7 +550,6 @@ void QDECL GHL_MessageEnd(unk)
|
|||
{
|
||||
ClientReliableCheckBlock(cl, sv.multicast.cursize);
|
||||
ClientReliableWrite_SZ(cl, sv.multicast.data, sv.multicast.cursize);
|
||||
ClientReliable_FinishWrite(cl);
|
||||
}
|
||||
break;
|
||||
case MSG_ALL:
|
||||
|
|
|
@ -32,6 +32,7 @@ Network limitations:
|
|||
auth mechanism: digest-md5, scram-sha1, plain.
|
||||
complete implementation. no issues.
|
||||
may be lacking srv entries, depends on installation.
|
||||
may have self-signed certificate issues, depends on installation.
|
||||
|
||||
client compat:
|
||||
googletalk:
|
||||
|
@ -46,7 +47,6 @@ client compat:
|
|||
|
||||
#include "../plugin.h"
|
||||
#include <time.h>
|
||||
#include "../../engine/common/netinc.h"
|
||||
#include "xml.h"
|
||||
|
||||
//#define NOICE
|
||||
|
@ -58,6 +58,10 @@ client compat:
|
|||
#define VOIP
|
||||
#endif
|
||||
|
||||
#ifdef JINGLE
|
||||
#include "../../engine/common/netinc.h"
|
||||
#endif
|
||||
|
||||
#define DEFAULTDOMAIN ""
|
||||
#define DEFAULTRESOURCE "Quake"
|
||||
#define QUAKEMEDIATYPE "quake"
|
||||
|
|
Loading…
Reference in a new issue