Skip to content

Commit

Permalink
protocol 43 to 48 support
Browse files Browse the repository at this point in the history
  • Loading branch information
brugal committed Sep 9, 2024
1 parent f3581a2 commit c1255b9
Show file tree
Hide file tree
Showing 30 changed files with 3,902 additions and 659 deletions.
7 changes: 6 additions & 1 deletion CREDITS-wolfcam.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,10 @@ Maverick and quake live developers for information regarding dm90 and dm91 proto
Dmitry 'qrealka' Loginov: cpma pro-sound description
Ravensoft: png output from Jedi Academy
GNU Unifont: font files
Gian 'myT' Schellenbaum: information regarding cpma 1.5[01] changes
Gian 'myT' Schellenbaum: information regarding cpma 1.5[01] changes, older demo protocol information from Uber Demo Tools
Jaco Kroon: backtrace code
Thilo Shulz and Zack Middleton: information about older Quake 3 protocols

https://github.com/zturtleman/lilium-arena-classic

"Credit for Quake 3 protocol 43 goes to Thilo Schulz (for ioEF) and Zack Middleton."
106 changes: 105 additions & 1 deletion FIXME
Original file line number Diff line number Diff line change
Expand Up @@ -1836,7 +1836,6 @@ No locals.
* ^ flag icon more visible?
* overflow player name in end game stats : engame-stats-player-name-overflow.dm_91
* zoom 2 pov stuck zoom-stuck-2-57.dm_91 -- 2016-07-31 seems to be a fov script, can't fix
* confusion between cgs.protocol and cgs.realProtocol
* /at now+3sec (offset for 'now' and also option to run only once)
* option for /wait with exact time instead of frame time
* q3mme command time based demo smoothing
Expand Down Expand Up @@ -2430,6 +2429,111 @@ Q_GetCpFromUtf8 invalid number of bytes specified in utf8 character 255

* VM crash with .wolfcamql/baseq3/z-cpma-pak153b2.pk3

* demo protocol 43-48

43 working
44 no demos
45 working -- treated as 43
46 working
47
48 working

- protocol 46 double check CS_LOCATIONS with team demo
- protocol 45 /record
- protocol 45 voip
- protocol 46 voip
- protocol 45 streaming
- protocol 46 streaming
- protocol 45 check PERS_

quake3 1.25 change log says: Two new medals will be awarded to players during Capture the Flag games. These medals recognize individual player actions that often go unheralded in the heat of play.

- protocol 46

- protocol 46 scores SCSIZE = 15, what is the last one?

- protocol 46 check PERS_CAPTURES

- protocol 45 /share/tmp/si_* CS_WARMUP not -1 during warmup before ready -- shows big number countdown

- client connect in demo parsing with protocol 43 might not be correct

- multiple demos : /demo duel.dm_48 old12.dm_48

duel.dm_48 old18.dm_48

(warmup) 62:02 processsnapshots() couldn't get nextsnap 3506
(warmup) 62:02 processsnapshots() couldn't get nextsnap 3506
(warmup) 62:02 processsnapshots() couldn't get nextsnap 3507
(warmup) 62:02 processsnapshots() couldn't get nextsnap 3507
(warmup) 62:02 processsnapshots() couldn't get nextsnap 3507
(warmup) 62:02 processsnapshots() couldn't get nextsnap 3508
(warmup) 62:02 processsnapshots() couldn't get nextsnap 3508

- CL_ParseExtraServerMessage not checking protocol correctly

- recording

* tested protocol 48 output in quake3 127 and it seems to be working

- option to force protocol
- impact of not having client number in demo messages
- unknown command viewlist - is that just osp? -- 2024-08-23 yes

- test /share/tmp/demo000.dm_48 and /share/tmp/demo001.dm_48

- don't check com_protocol in msg.c
- /streamdemo check protocol 43
- protocol 43 /players no main client number in demos?
- tdm.dm3 protocol 43 no end of game stats (Timelimit hit not checked correctly?)

- speex voip
- /streamdemo spamming:

Opening IP socket: 0.0.0.0:27960
disconnect
checking workshops
hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
CL_ParseExtraServerMessage: Illegible server message 117 for demoFile 0CL_ParseExtraServerMessage: Illegible server message 193 for demoFile 0CL_ParseExtraServerMessage: Illegible server message 203 for demoFile 0CL_ParseExtraServerMessage: Illegible server message 193 for demoFile 0CL_ParseExtraServerMessage: Illegible server message 186 for demoFile


- why doesn't stream_demo_look_ahead() get full message?

stream_demo_look_ahead() waiting for message, need 16, demo position 0
Com_Error(): CL_ParseServerMessage: Illegible server message 117********************

acano@debian:/share/tmp/stream1$ python slow-copy.py duel.dm_48 x.dm_48
3800
len: 3800, position 3800
100
len: 100, position 3900
^[OS^[OS^[OS^[OS^CTraceback (most recent call last):
File "/share/tmp/stream1/slow-copy.py", line 13, in <module>
numKBstr = input()
^^^^^^^
KeyboardInterrupt

* stream_demo_look_ahead() why was that added?


* //FIXME 2024-07-28 this is a mess, should have commented why it was needed, the stream can have data written after this returns and what this would have detected as not enough data for message might have it afterwards, that could mess up the snap/message count, for something like that maybe only read the demo/stream end position once
// hereeee1111111
stream_demo_look_ahead();

changeset: 9050:074cb4fb2345
user: acano
date: Thu Oct 21 06:22:18 2021 -0400
summary: demo streaming look ahead to allow fast forwarding


* /streamdemo can't quit (f4 ) while in checking for workshop screen

* check demo streaming and /record if you don't even have gamestate yet

* multiple demos with smaller second one:

CL_ReadExtraDemoMessage demo file 2 ended spammed if second is shorter and nothing to break outer loop?

----


Expand Down
2 changes: 1 addition & 1 deletion Makefile.local
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION=12.6
VERSION=12.7test1

USE_CODEC_VORBIS=1
USE_FREETYPE=1
Expand Down
6 changes: 3 additions & 3 deletions code/cgame/cg_consolecmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -1270,7 +1270,7 @@ static void CG_ListEntities_f (void)
ent = &cent->currentState;
if (ent->eType < 0) {
etypeStr = "invalid";
} else if (ent->eType >= ET_EVENTS) {
} else if ((cgs.realProtocol >= 46 && ent->eType >= ET_EVENTS) || (cgs.realProtocol < 46 && ent->eType >= (ET_EVENTS - 1))) {
etypeStr = "event";
} else {
etypeStr = entTypes[ent->eType];
Expand Down Expand Up @@ -6382,7 +6382,7 @@ static void CG_ClientOverride_f (void)
} else {
//Com_Printf("change config string: '%s' '%s' '%s'\n", key, value, buffer);
Info_SetValueForKey(buffer, key, value);
if (cgs.protocol == PROTOCOL_Q3) {
if (cgs.protocolClass == PROTOCOL_Q3) {
CG_ChangeConfigString(buffer, CSQ3_PLAYERS + j);
} else {
CG_ChangeConfigString(buffer, CS_PLAYERS + j);
Expand Down Expand Up @@ -8035,7 +8035,7 @@ static void CG_SeekNextRound_f (void)
if (roundStartIndex > -1) {
int roundTime;

if (cgs.protocol == PROTOCOL_QL) {
if (cgs.protocolClass == PROTOCOL_QL) {
roundTime = atoi(CG_ConfigString(CS_ROUND_TIME));

// ql specific
Expand Down
8 changes: 4 additions & 4 deletions code/cgame/cg_draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -7065,7 +7065,7 @@ static void CG_RoundAnnouncements (void)

#if 0
//FIXME cpma and others...
if (cgs.protocol != PROTOCOL_QL) {
if (cgs.protocolClass != PROTOCOL_QL) {
return;
}
#endif
Expand Down Expand Up @@ -7200,7 +7200,7 @@ static void CG_DrawCenter (void)
return;
} else {
//FIXME dont use centerprint it will hover around after match has restarted
if (cgs.protocol == PROTOCOL_QL) {
if (cgs.protocolClass == PROTOCOL_QL) {
CG_CenterPrint(va("Match resumes in ^5%d ^7seconds", (cgs.timeoutEndTime - cg.time) / 1000 + 1), SCREEN_HEIGHT * 0.30, BIGCHAR_WIDTH);
//if (cgs.timeoutEndTime - cg.snap->serverTime == 0) {
if (cgs.timeoutEndTime - cg.time == 0) {
Expand All @@ -7213,7 +7213,7 @@ static void CG_DrawCenter (void)
}

if (cgs.timeoutCountingDown) {
if (cgs.protocol == PROTOCOL_QL) {
if (cgs.protocolClass == PROTOCOL_QL) {
// clear message
CG_CenterPrint("", SCREEN_HEIGHT * 0.30, BIGCHAR_WIDTH);
}
Expand Down Expand Up @@ -10127,7 +10127,7 @@ static void CG_DrawWarmup( void ) {
x = cg_drawWaitingForPlayersX.value;
y = cg_drawWaitingForPlayersY.value;

if (cgs.protocol == PROTOCOL_QL && *CG_ConfigString(CS_READY_UP_TIME)) {
if (cgs.protocolClass == PROTOCOL_QL && *CG_ConfigString(CS_READY_UP_TIME)) {
readyUpTime = atoi(CG_ConfigString(CS_READY_UP_TIME));
if (readyUpTime > cg.time) {
int nx;
Expand Down
14 changes: 7 additions & 7 deletions code/cgame/cg_ents.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ static void CG_EntityEffects( const centity_t *cent ) {
}
} else if (cent->currentState.loopSound) {

//Com_Printf("%d loop %d '%s'\n", cent->currentState.number, cent->currentState.loopSound, CG_ConfigString(CS_SOUNDS + cent->currentState.loopSound - (cgs.protocol == PROTOCOL_QL ? 1 : 0)));
//Com_Printf("%d loop %d '%s'\n", cent->currentState.number, cent->currentState.loopSound, CG_ConfigString(CS_SOUNDS + cent->currentState.loopSound - (cgs.protocolClass == PROTOCOL_QL ? 1 : 0)));

if (cent->currentState.eType != ET_SPEAKER) {
//Com_Printf("^3adding loop sound to %d %d %s\n", cent->currentState.number, cent->currentState.loopSound, CG_ConfigString( CS_SOUNDS + cent->currentState.loopSound));
Expand Down Expand Up @@ -1077,7 +1077,7 @@ static void CG_TieredArmorAvailability (const centity_t *cent, const gitem_t *it
return;
}

if (cgs.protocol != PROTOCOL_QL) {
if (cgs.protocolClass != PROTOCOL_QL) {
return;
}

Expand Down Expand Up @@ -1150,7 +1150,7 @@ static void CG_DrawTimerPie (const centity_t *cent)
qhandle_t currentShader;
int num5Chunks;

if (cgs.protocol != PROTOCOL_QL) {
if (cgs.protocolClass != PROTOCOL_QL) {
return;
}

Expand Down Expand Up @@ -1299,7 +1299,7 @@ static void CG_DrawPowerupRespawnPOI (const centity_t *cent)
vec3_t org;
float minWidth, maxWidth, radius, dist;

if (cgs.protocol != PROTOCOL_QL) {
if (cgs.protocolClass != PROTOCOL_QL) {
return;
}

Expand Down Expand Up @@ -1393,7 +1393,7 @@ static void CG_DrawPowerupAvailable (const centity_t *cent)
float frac;
float total;

if (cgs.protocol != PROTOCOL_QL) {
if (cgs.protocolClass != PROTOCOL_QL) {
return;
}

Expand Down Expand Up @@ -1944,7 +1944,7 @@ static void CG_Missile( centity_t *cent ) {
clientNum = s1->clientNum;
}

if (cgs.protocol == PROTOCOL_QL && (clientNum >= 0 && clientNum < MAX_CLIENTS)) {
if (cgs.protocolClass == PROTOCOL_QL && (clientNum >= 0 && clientNum < MAX_CLIENTS)) {
CG_CopyPlayerDataToScriptData(&cg_entities[clientNum]);
} else {
ScriptVars.inEyes = qfalse;
Expand Down Expand Up @@ -3251,7 +3251,7 @@ static void CG_AddCEntity( centity_t *cent ) {
int entNum;

// event-only entities will have been dealt with already
if ( cent->currentState.eType >= ET_EVENTS ) {
if ( (cgs.realProtocol >= 46 && cent->currentState.eType >= ET_EVENTS) || (cgs.realProtocol < 46 && cent->currentState.eType >= (ET_EVENTS - 1)) ) {
return;
}

Expand Down
Loading

0 comments on commit c1255b9

Please sign in to comment.