[engine]Update the game engine submodule. Adjust the game logic for
the server side demo changes.
diff --git a/source/OpenWolf-Engine b/source/OpenWolf-Engine
index 741d0c5..43aed86 160000
--- a/source/OpenWolf-Engine
+++ b/source/OpenWolf-Engine
@@ -1 +1 @@
-Subproject commit 741d0c564c9378474816b0e4fa5056fcebe33f4a
+Subproject commit 43aed866b1b6a3820f4117a1b20b02407b55a983
diff --git a/source/game-logic/CMakeLists.txt b/source/game-logic/CMakeLists.txt
index 53a87b0..a6ae321 100644
--- a/source/game-logic/CMakeLists.txt
+++ b/source/game-logic/CMakeLists.txt
@@ -178,7 +178,6 @@ set( SGAMELIST_HEADERS
${MOUNT_DIR}/API/serverInit_api.hpp
${MOUNT_DIR}/API/CmdBuffer_api.hpp
${MOUNT_DIR}/API/CmdSystem_api.hpp
- ${MOUNT_DIR}/API/serverDemo_api.hpp
${MOUNT_DIR}/API/system_api.hpp
${MOUNT_DIR}/API/soundSystem_api.hpp
${MOUNT_DIR}/API/FileSystem_api.hpp
diff --git a/source/game-logic/src/gameLogics/cgame/cgame_api.cpp b/source/game-logic/src/gameLogics/cgame/cgame_api.cpp
index 1a6814e..33f5db1 100644
--- a/source/game-logic/src/gameLogics/cgame/cgame_api.cpp
+++ b/source/game-logic/src/gameLogics/cgame/cgame_api.cpp
@@ -128,16 +128,6 @@ void trap_LiteralArgs( valueType* buffer, sint bufferLength )
imports->cmdSystem->LiteralArgsBuffer( buffer, bufferLength );
}
-sint trap_GetDemoState( void )
-{
- return imports->DemoState();
-}
-
-sint trap_GetDemoPos( void )
-{
- return imports->DemoPos();
-}
-
sint trap_FS_FOpenFile( pointer qpath, fileHandle_t* f, fsMode_t mode )
{
return imports->fileSystem->FOpenFileByMode( qpath, f, mode );
@@ -730,11 +720,6 @@ void trap_R_Finish( void )
//imports->renderSystem->Finish();
}
-void trap_GetDemoName( valueType* buffer, sint size )
-{
- imports->CL_DemoName( buffer, size );
-}
-
sint trap_R_LightForPoint( vec3_t point, vec3_t ambientLight, vec3_t directedLight, vec3_t lightDir )
{
return imports->renderSystem->LightForPoint( point, ambientLight, directedLight, lightDir );
diff --git a/source/game-logic/src/gameLogics/cgame/cgame_draw.cpp b/source/game-logic/src/gameLogics/cgame/cgame_draw.cpp
index 6ca899c..bc95b6c 100644
--- a/source/game-logic/src/gameLogics/cgame/cgame_draw.cpp
+++ b/source/game-logic/src/gameLogics/cgame/cgame_draw.cpp
@@ -1745,11 +1745,6 @@ void idCGameDraw::DrawDemoPlayback( rectDef_t* rect, vec4_t color, qhandle_t sha
return;
}
- if( trap_GetDemoState() != DS_PLAYBACK )
- {
- return;
- }
-
trap_R_SetColor( color );
idCGameDrawTools::DrawPic( rect->x, rect->y, rect->w, rect->h, shader );
trap_R_SetColor( nullptr );
@@ -1767,11 +1762,6 @@ void idCGameDraw::DrawDemoRecording( rectDef_t* rect, vec4_t color, qhandle_t sh
return;
}
- if( trap_GetDemoState() != DS_RECORDING )
- {
- return;
- }
-
trap_R_SetColor( color );
idCGameDrawTools::DrawPic( rect->x, rect->y, rect->w, rect->h, shader );
trap_R_SetColor( nullptr );
@@ -4373,5 +4363,3 @@ void idCGameDraw::DrawActive( stereoFrame_t stereoView )
// draw status bar and other floating elements
Draw2D( );
}
-
-
diff --git a/source/game-logic/src/gameLogics/cgame/cgame_main.cpp b/source/game-logic/src/gameLogics/cgame/cgame_main.cpp
index 10c2d0d..bb0f6d7 100644
--- a/source/game-logic/src/gameLogics/cgame/cgame_main.cpp
+++ b/source/game-logic/src/gameLogics/cgame/cgame_main.cpp
@@ -1121,7 +1121,7 @@ idCGameMain::ConfigString
pointer idCGameMain::ConfigString( sint index )
{
if( index < 0 || index >= MAX_CONFIGSTRINGS )
- Error( "CG_ConfigString: bad index: %i", index );
+ Error( "idCGameMain::ConfigString: bad index: %i", index );
return cgs.gameState.stringData + cgs.gameState.stringOffsets[ index ];
}
@@ -2293,4 +2293,3 @@ bool idCGameLocal::WantsBindKeys( void )
{
return ( g_waitingForKey && g_bindItem ) ? true : false;
}
-
diff --git a/source/game-logic/src/gameLogics/sgame/sgame_admin.cpp b/source/game-logic/src/gameLogics/sgame/sgame_admin.cpp
index 78e4cac..e822f0e 100644
--- a/source/game-logic/src/gameLogics/sgame/sgame_admin.cpp
+++ b/source/game-logic/src/gameLogics/sgame/sgame_admin.cpp
@@ -2311,12 +2311,6 @@ bool idAdminLocal::AdminPutTeam( gentity_t* ent, sint skiparg )
return false;
}
- if( level.demoState == DS_PLAYBACK )
- {
- adminLocal.ADMP( "^3!putteam: ^7cannot join a team while a demo is playing\n" );
- return false;
- }
-
idSGameTeam::ChangeTeam( vic, teamnum );
AP( va( "print \"^3!putteam: ^7%s^7 put %s^7 on to the %s team\n\"", ( ent ) ? ent->client->pers.netname : "console", vic->client->pers.netname, bggame->TeamName( teamnum ) ) );
diff --git a/source/game-logic/src/gameLogics/sgame/sgame_api.cpp b/source/game-logic/src/gameLogics/sgame/sgame_api.cpp
index f5da9c6..5cd81d6 100644
--- a/source/game-logic/src/gameLogics/sgame/sgame_api.cpp
+++ b/source/game-logic/src/gameLogics/sgame/sgame_api.cpp
@@ -39,7 +39,6 @@ idServerInitSystem* serverInitSystem;
idServerMainSystem* serverMainSystem;
idCmdBufferSystem* cmdBufferSystem;
idCmdSystem* cmdSystem;
-idServerDemoSystem* serverDemoSystem;
idSystem* idsystem;
#ifdef GAMEDLL
@@ -67,7 +66,6 @@ Q_EXPORT idSGame* gameEntry( gameImports_t* gimports )
serverMainSystem = imports->serverMainSystem;
cmdBufferSystem = imports->cmdBufferSystem;
cmdSystem = imports->cmdSystem;
- serverDemoSystem = imports->serverDemoSystem;
idsystem = imports->idsystem;
return sgame;
@@ -308,11 +306,6 @@ sfxHandle_t trap_S_RegisterSound( pointer sample )
return soundSystem->RegisterSound( sample, false );
}
-void trap_DemoCommand( demoCommand_t cmd, pointer string )
-{
- imports->serverGameSystem->DemoWriteCommand( cmd, string );
-}
-
void trap_GetUsercmd( sint clientNum, usercmd_t* cmd )
{
imports->serverGameSystem->GetUsercmd( clientNum, cmd );
diff --git a/source/game-logic/src/gameLogics/sgame/sgame_client.cpp b/source/game-logic/src/gameLogics/sgame/sgame_client.cpp
index ba6be30..a38ad91 100644
--- a/source/game-logic/src/gameLogics/sgame/sgame_client.cpp
+++ b/source/game-logic/src/gameLogics/sgame/sgame_client.cpp
@@ -1199,9 +1199,6 @@ void idSGameLocal::ClientUserinfoChanged( sint clientNum )
trap_SetConfigstring( CS_PLAYERS + clientNum, userinfo );
- // log to demo
- idSGameMain::DemoCommand( DC_CLIENT_SET, va( "%d %s", clientNum, userinfo ) );
-
// idSGameMain::LogPrintf( "ClientUserinfoChanged: %i %s\n", clientNum, userinfo );
}
@@ -1384,10 +1381,6 @@ void idSGameLocal::ClientBegin( sint clientNum )
admin = client->pers.admin;
idSGameMain::LogPrintf( "idSGameLocal::ClientBegin: %i\n", clientNum );
-
- // log to demo
- idSGameMain::DemoCommand( DC_CLIENT_SET, va( "%d \\name\\%s\\team\\%d", clientNum,
- client->pers.netname, client->pers.teamSelection ) );
// count current clients and rank for scoreboard
idSGameMain::CalculateRanks( );
@@ -1451,7 +1444,6 @@ void idSGameClient::BotBegin( sint clientNum )
// log to demo
trap_GetConfigstring( CS_PLAYERS + clientNum, userinfo, sizeof( userinfo ) );
- idSGameMain::DemoCommand( DC_CLIENT_SET, va( "%d %s", clientNum, userinfo ) );
// count current clients and rank for scoreboard
idSGameMain::CalculateRanks( );
@@ -1835,7 +1827,5 @@ void idSGameLocal::ClientDisconnect( sint clientNum )
trap_SetConfigstring( CS_PLAYERS + clientNum, "" );
- idSGameMain::DemoCommand( DC_CLIENT_REMOVE, va( "%d", clientNum ) );
-
idSGameMain::CalculateRanks( );
}
diff --git a/source/game-logic/src/gameLogics/sgame/sgame_cmds.cpp b/source/game-logic/src/gameLogics/sgame/sgame_cmds.cpp
index be8a848..393a466 100644
--- a/source/game-logic/src/gameLogics/sgame/sgame_cmds.cpp
[... diff too long, it was truncated ...]
GitHub
sha: 4d373b61