Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
9c3f81f
dummy change
JBustos22 Mar 16, 2025
3b9247b
print on finish
JBustos22 Mar 17, 2025
9e6e130
separate thread
JBustos22 Mar 17, 2025
da1fa29
file structure
JBustos22 Mar 17, 2025
35dd2ce
record -> records
JBustos22 Mar 17, 2025
180b1ed
record -> records
JBustos22 Mar 17, 2025
f8f0d2a
command recognition
JBustos22 Mar 17, 2025
00687df
set up handling of modules
JBustos22 Mar 17, 2025
ce6f620
add http helper functions, hit API for top
JBustos22 Mar 18, 2025
61b34f6
send url-encoded say str to API /commands endpoint
JBustos22 Mar 21, 2025
9d73934
send top command
JBustos22 Mar 21, 2025
9efeefb
clean up and use clientCommand instead of say
JBustos22 Mar 24, 2025
af04791
don't execute command if RS command
JBustos22 Mar 24, 2025
3846a83
login/logout, records
JBustos22 Mar 25, 2025
cd0dadc
server demos implementation
JBustos22 Mar 29, 2025
3eefabc
local login/logout, start serverdemo renaming
JBustos22 Mar 31, 2025
939c9cc
save serverdemo if logged at finish time
JBustos22 Apr 1, 2025
c309d86
save demo x frames after finish or on kill/spectate/disconnect
JBustos22 Apr 2, 2025
dfa2982
maturize api responses, logout is local
JBustos22 Apr 5, 2025
ca10915
add rs_apiHost cvar
JBustos22 Apr 6, 2025
8e742d6
add pthreads lib
JBustos22 Apr 6, 2025
323329e
add pthreads lib
JBustos22 Apr 6, 2025
7a96a9d
add pthreads lib
JBustos22 Apr 6, 2025
e6a609e
hardcode api url
JBustos22 Apr 6, 2025
ec22a7f
multithread the commands
JBustos22 Apr 7, 2025
5841734
fix compile warnings
JBustos22 Apr 8, 2025
c36018e
fix people
JBustos22 Apr 8, 2025
64d8c44
improve serverdemo events and prevent spoofing
JBustos22 Apr 10, 2025
f79450a
fs include for nfs
JBustos22 Apr 10, 2025
77391cf
add some debugging
JBustos22 Apr 10, 2025
8c70b6d
thread-safe va
JBustos22 Apr 15, 2025
9747af8
send more server info to support multiphysics records
JBustos22 Apr 18, 2025
15ada81
fix entity baselines, etc
JBustos22 Apr 26, 2025
0480643
broadcast
JBustos22 Apr 26, 2025
1ecaed4
fix weird entities
JBustos22 Apr 27, 2025
e907600
clean up, fix missiles
JBustos22 Apr 27, 2025
22f3a26
disable serverdemos
JBustos22 Apr 27, 2025
910531b
re-enable, stop copying baselines to client
JBustos22 Apr 27, 2025
3f86ed3
prevent timer spoofing
JBustos22 Apr 28, 2025
7479cca
handle extra stuff
JBustos22 Apr 28, 2025
84f21fc
create rs version of com_parse, skip comments
JBustos22 Apr 28, 2025
7b7b9bd
take out time out debug
JBustos22 Apr 28, 2025
9ac479b
fix trail check
JBustos22 Apr 28, 2025
e3b7ea9
check for \n and \0
JBustos22 Apr 28, 2025
4a79d67
check for \n and \0
JBustos22 Apr 28, 2025
182072a
enforce date length
JBustos22 Apr 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ RVDIR=$(MOUNT_DIR)/renderervk
SDLDIR=$(MOUNT_DIR)/sdl
SDLHDIR=$(MOUNT_DIR)/libsdl/include/SDL2

RSDIR=$(MOUNT_DIR)/recordsystem
CMDIR=$(MOUNT_DIR)/qcommon
UDIR=$(MOUNT_DIR)/unix
W32DIR=$(MOUNT_DIR)/win32
Expand Down Expand Up @@ -438,6 +439,8 @@ ifdef MINGW
LDFLAGS += -Wl,--gc-sections -fvisibility=hidden
LDFLAGS += -lwsock32 -lgdi32 -lwinmm -lole32 -lws2_32 -lpsapi -lcomctl32
LDFLAGS += -flto
LDFLAGS += -lpthread


CLIENT_LDFLAGS=$(LDFLAGS)

Expand Down Expand Up @@ -707,7 +710,7 @@ endef

define DO_DED_CC
$(echo_cmd) "DED_CC $<"
$(Q)$(CC) $(CFLAGS) -DDEDICATED -o $@ -c $<
$(Q)$(CC) $(CFLAGS) -DDEDICATED -DENABLE_RS -o $@ -c $<
endef

define DO_WINDRES
Expand Down Expand Up @@ -1305,6 +1308,11 @@ Q3DOBJ = \
$(B)/ded/cm_test.o \
$(B)/ded/cm_trace.o \
$(B)/ded/cmd.o \
$(B)/ded/cJSON.o \
$(B)/ded/rs_records.o \
$(B)/ded/rs_common.o \
$(B)/ded/rs_commands.o \
$(B)/ded/rs_serverdemos.o \
$(B)/ded/common.o \
$(B)/ded/cvar.o \
$(B)/ded/files.o \
Expand Down Expand Up @@ -1384,7 +1392,7 @@ endif

$(B)/$(TARGET_SERVER): $(Q3DOBJ)
$(echo_cmd) "LD $@"
$(Q)$(CC) -o $@ $(Q3DOBJ) $(LDFLAGS)
$(Q)$(CC) -o $@ $(Q3DOBJ) $(LDFLAGS) -lcurl -lpthread

#############################################################################
## CLIENT/SERVER RULES
Expand All @@ -1399,6 +1407,9 @@ $(B)/client/%.o: $(CDIR)/%.c
$(B)/client/%.o: $(SDIR)/%.c
$(DO_CC)

$(B)/client/%.o: $(RSDIR)/%.c
$(DO_CC)

$(B)/client/%.o: $(CMDIR)/%.c
$(DO_CC)

Expand Down Expand Up @@ -1465,6 +1476,9 @@ $(B)/ded/%.o: $(ADIR)/%.s
$(B)/ded/%.o: $(SDIR)/%.c
$(DO_DED_CC)

$(B)/ded/%.o: $(RSDIR)/%.c
$(DO_DED_CC)

$(B)/ded/%.o: $(CMDIR)/%.c
$(DO_DED_CC)

Expand Down
49 changes: 48 additions & 1 deletion code/qcommon/files.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ static cvar_t *fs_apppath;
static cvar_t *fs_steampath;

static cvar_t *fs_basepath;
static cvar_t *fs_include; // Cyberstorm - Optional extra path.
static cvar_t *fs_basegame;
static cvar_t *fs_copyfiles;
static cvar_t *fs_gamedirvar;
Expand Down Expand Up @@ -2520,7 +2521,6 @@ static void FS_WriteCacheHeader( FILE *f )
fwrite( cache_header, sizeof( cache_header ), 1, f );
}


static qboolean FS_ValidateCacheHeader( FILE *f )
{
byte buf[ sizeof(cache_header) ];
Expand Down Expand Up @@ -4103,6 +4103,44 @@ static void FS_Which_f( void ) {
}
}

static void FS_AddMapDirectory( const char *path, const char *dir ) {
const searchpath_t *sp;
int len;
searchpath_t *search;
int path_len;
int dir_len;

for ( sp = fs_searchpaths ; sp ; sp = sp->next ) {
if ( sp->dir && !Q_stricmp( sp->dir->path, path ) && !Q_stricmp( sp->dir->gamedir, dir )) {
return; // we've already got this one
}
}

Q_strncpyz( fs_gamedir, dir, sizeof( fs_gamedir ) );

//
// add the directory to the search path
//
path_len = (int) strlen( path ) + 1;
path_len = PAD( path_len, sizeof( int ) );
dir_len = (int) strlen( dir ) + 1;
dir_len = PAD( dir_len, sizeof( int ) );
len = sizeof( *search ) + sizeof( *search->dir ) + path_len + dir_len;

search = Z_TagMalloc( len, TAG_SEARCH_PATH );
Com_Memset( search, 0, len );
search->dir = (directory_t*)( search + 1 );
search->dir->path = (char*)( search->dir + 1 );
search->dir->gamedir = (char*)( search->dir->path + path_len );

strcpy( search->dir->path, path );
strcpy( search->dir->gamedir, dir );

search->next = fs_searchpaths;
fs_searchpaths = search;
fs_dirCount++;
}


//===========================================================================

Expand Down Expand Up @@ -4692,6 +4730,8 @@ static void FS_Startup( void ) {
Cvar_SetDescription( fs_copyfiles, "Whether or not to copy files when loading them into the game. Every file found in the cdpath will be copied over." );
fs_basepath = Cvar_Get( "fs_basepath", Sys_DefaultBasePath(), CVAR_INIT | CVAR_PROTECTED | CVAR_PRIVATE );
Cvar_SetDescription( fs_basepath, "Write-protected CVAR specifying the path to the installation folder of the game." );
fs_include = Cvar_Get("fs_include", "", CVAR_INIT); // Cyberstorm
Cvar_SetDescription( fs_include, "Write-protected CVAR specifying additional paths to look for maps." );
fs_basegame = Cvar_Get( "fs_basegame", BASEGAME, CVAR_INIT | CVAR_PROTECTED );
Cvar_SetDescription( fs_basegame, "Write-protected CVAR specifying the path to the base game(s) folder(s), separated by '/'." );
fs_steampath = Cvar_Get( "fs_steampath", "", CVAR_INIT | CVAR_PROTECTED | CVAR_PRIVATE );
Expand Down Expand Up @@ -4776,6 +4816,13 @@ static void FS_Startup( void ) {
}
#endif

// Cyberstorm
if (fs_include->string[0]) {
Com_Printf( "----- NFS -----\n" );
FS_AddMapDirectory(fs_basepath->string, fs_include->string);
}
// !Cyberstorm

// fs_homepath is somewhat particular to *nix systems, only add if relevant
// NOTE: same filtering below for mods and basegame
if ( fs_homepath->string[0] && Q_stricmp( fs_homepath->string, fs_basepath->string ) ) {
Expand Down
Loading