diff --git a/CMakeLists.txt b/CMakeLists.txt index ddfb433..584ac68 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,6 @@ cmake_minimum_required(VERSION 2.6) # SDK -D_D3SDK # don't add these as options, but document them? -# TARGET_DEMO there are no demo pk4s compatible to this 1.3.1 codebase # IDNET_HOST -DIDNET_HOST=\\"%s\\"' % IDNET_HOST # DEBUG_MEMORY -DID_DEBUG_MEMORY', '-DID_REDIRECT_NEWDELETE # LIBC_MALLOC -DUSE_LIBC_MALLOC=0 diff --git a/d3xp/Game_local.cpp b/d3xp/Game_local.cpp index f1252d2..13c8b8a 100644 --- a/d3xp/Game_local.cpp +++ b/d3xp/Game_local.cpp @@ -3425,7 +3425,6 @@ bool idGameLocal::InhibitEntitySpawn( idDict &spawnArgs ) { const char *name; -#ifndef ID_DEMO_BUILD if ( g_skill.GetInteger() == 3 ) { name = spawnArgs.GetString( "classname" ); // _D3XP :: remove moveable medkit packs also @@ -3435,7 +3434,6 @@ bool idGameLocal::InhibitEntitySpawn( idDict &spawnArgs ) { result = true; } } -#endif if ( gameLocal.isMultiplayer ) { name = spawnArgs.GetString( "classname" ); diff --git a/d3xp/Player.cpp b/d3xp/Player.cpp index 9483eb6..dc779df 100644 --- a/d3xp/Player.cpp +++ b/d3xp/Player.cpp @@ -454,15 +454,11 @@ void idInventory::RestoreInventory( idPlayer *owner, const idDict &dict ) { // weapons are stored as a number for persistant data, but as strings in the entityDef weapons = dict.GetInt( "weapon_bits", "0" ); -#ifdef ID_DEMO_BUILD - Give( owner, dict, "weapon", dict.GetString( "weapon" ), NULL, false ); -#else if ( g_skill.GetInteger() >= 3 ) { Give( owner, dict, "weapon", dict.GetString( "weapon_nightmare" ), NULL, false ); } else { Give( owner, dict, "weapon", dict.GetString( "weapon" ), NULL, false ); } -#endif num = dict.GetInt( "levelTriggers" ); for ( i = 0; i < num; i++ ) { @@ -1923,12 +1919,11 @@ void idPlayer::Spawn( void ) { g_damageScale.SetFloat( 1.0f ); #endif g_armorProtection.SetFloat( ( g_skill.GetInteger() < 2 ) ? 0.4f : 0.2f ); -#ifndef ID_DEMO_BUILD + if ( g_skill.GetInteger() == 3 ) { healthTake = true; nextHealthTake = gameLocal.time + g_healthTakeTime.GetInteger() * 1000; } -#endif } } @@ -3985,7 +3980,7 @@ void idPlayer::UpdatePowerUps( void ) { nextHealthPulse = gameLocal.time + HEALTHPULSE_TIME; healthPulse = true; } -#ifndef ID_DEMO_BUILD + if ( !gameLocal.inCinematic && influenceActive == 0 && g_skill.GetInteger() == 3 && gameLocal.time > nextHealthTake && !AI_DEAD && health > g_healthTakeLimit.GetInteger() ) { assert( !gameLocal.isClient ); // healthPool never be set on client @@ -4002,7 +3997,6 @@ void idPlayer::UpdatePowerUps( void ) { nextHealthTake = gameLocal.time + g_healthTakeTime.GetInteger() * 1000; healthTake = true; } -#endif } /* diff --git a/d3xp/Target.cpp b/d3xp/Target.cpp index c33878a..3a3f74c 100644 --- a/d3xp/Target.cpp +++ b/d3xp/Target.cpp @@ -196,19 +196,12 @@ idTarget_EndLevel::Event_Activate void idTarget_EndLevel::Event_Activate( idEntity *activator ) { idStr nextMap; -#ifdef ID_DEMO_BUILD - if ( spawnArgs.GetBool( "endOfGame" ) ) { - cvarSystem->SetCVarBool( "g_nightmare", true ); - gameLocal.sessionCommand = "endofDemo"; - return; - } -#else if ( spawnArgs.GetBool( "endOfGame" ) ) { cvarSystem->SetCVarBool( "g_nightmare", true ); gameLocal.sessionCommand = "disconnect"; return; } -#endif + if ( !spawnArgs.GetString( "nextMap", "", nextMap ) ) { gameLocal.Printf( "idTarget_SessionCommand::Event_Activate: no nextMap key\n" ); return; diff --git a/d3xp/gamesys/SysCmds.cpp b/d3xp/gamesys/SysCmds.cpp index 5ee3a7d..8dc894a 100644 --- a/d3xp/gamesys/SysCmds.cpp +++ b/d3xp/gamesys/SysCmds.cpp @@ -2481,7 +2481,6 @@ void idGameLocal::InitConsoleCommands( void ) { cmdSystem->AddCommand( "clearLights", Cmd_ClearLights_f, CMD_FL_GAME|CMD_FL_CHEAT, "clears all lights" ); cmdSystem->AddCommand( "gameError", Cmd_GameError_f, CMD_FL_GAME|CMD_FL_CHEAT, "causes a game error" ); -#ifndef ID_DEMO_BUILD cmdSystem->AddCommand( "disasmScript", Cmd_DisasmScript_f, CMD_FL_GAME|CMD_FL_CHEAT, "disassembles script" ); cmdSystem->AddCommand( "recordViewNotes", Cmd_RecordViewNotes_f, CMD_FL_GAME|CMD_FL_CHEAT, "record the current view position with notes" ); cmdSystem->AddCommand( "showViewNotes", Cmd_ShowViewNotes_f, CMD_FL_GAME|CMD_FL_CHEAT, "show any view notes for the current map, successive calls will cycle to the next note" ); @@ -2501,7 +2500,6 @@ void idGameLocal::InitConsoleCommands( void ) { cmdSystem->AddCommand( "serverMapRestart", idGameLocal::MapRestart_f, CMD_FL_GAME, "restart the current game" ); cmdSystem->AddCommand( "serverForceReady", idMultiplayerGame::ForceReady_f,CMD_FL_GAME, "force all players ready" ); cmdSystem->AddCommand( "serverNextMap", idGameLocal::NextMap_f, CMD_FL_GAME, "change to the next map" ); -#endif // localization help commands cmdSystem->AddCommand( "nextGUI", Cmd_NextGUI_f, CMD_FL_GAME|CMD_FL_CHEAT, "teleport the player to the next func_static with a gui" ); diff --git a/framework/BuildDefines.h b/framework/BuildDefines.h index 309ef6b..cccf591 100644 --- a/framework/BuildDefines.h +++ b/framework/BuildDefines.h @@ -75,17 +75,13 @@ If you have questions concerning this license or the applicable additional terms // compiled out. //#define ID_DEDICATED -// if this is defined, the executable positively won't work with any paks other -// than the demo pak, even if productid is present. -//#define ID_DEMO_BUILD - // don't define ID_ALLOW_TOOLS when we don't want tool code in the executable. -#if defined( _WIN32 ) && defined(_MFC_VER) && !defined( ID_DEDICATED ) && !defined( ID_DEMO_BUILD ) +#if defined( _WIN32 ) && defined(_MFC_VER) && !defined( ID_DEDICATED ) #define ID_ALLOW_TOOLS #endif #ifndef ID_ENFORCE_KEY -# if !defined( ID_DEDICATED ) && !defined( ID_DEMO_BUILD ) +# if !defined( ID_DEDICATED ) # define ID_ENFORCE_KEY 1 # else # define ID_ENFORCE_KEY 0 diff --git a/framework/Licensee.h b/framework/Licensee.h index fe15c76..532fe5b 100644 --- a/framework/Licensee.h +++ b/framework/Licensee.h @@ -39,11 +39,7 @@ If you have questions concerning this license or the applicable additional terms #define ENGINE_VERSION "dhewm 1.3.1" // printed in console // paths -#ifdef ID_DEMO_BUILD - #define BASE_GAMEDIR "demo" -#else - #define BASE_GAMEDIR "base" -#endif +#define BASE_GAMEDIR "base" // filenames #define CONFIG_FILE "dhewm.cfg" @@ -94,11 +90,7 @@ If you have questions concerning this license or the applicable additional terms #define WIN32_CONSOLE_CLASS "dhewm 3 WinConsole" // Linux info -#ifdef ID_DEMO_BUILD - #define LINUX_DEFAULT_PATH "/usr/local/games/dhewm3-demo" -#else - #define LINUX_DEFAULT_PATH "/usr/local/games/dhewm3" -#endif +#define LINUX_DEFAULT_PATH "/usr/local/games/dhewm3" // CD Key file info // goes into BASE_GAMEDIR whatever the fs_game is set to diff --git a/game/Game_local.cpp b/game/Game_local.cpp index 2f81739..1c9d0a1 100644 --- a/game/Game_local.cpp +++ b/game/Game_local.cpp @@ -3137,14 +3137,12 @@ bool idGameLocal::InhibitEntitySpawn( idDict &spawnArgs ) { } const char *name; -#ifndef ID_DEMO_BUILD if ( g_skill.GetInteger() == 3 ) { name = spawnArgs.GetString( "classname" ); if ( idStr::Icmp( name, "item_medkit" ) == 0 || idStr::Icmp( name, "item_medkit_small" ) == 0 ) { result = true; } } -#endif if ( gameLocal.isMultiplayer ) { name = spawnArgs.GetString( "classname" ); diff --git a/game/Player.cpp b/game/Player.cpp index 0789286..e3878fa 100644 --- a/game/Player.cpp +++ b/game/Player.cpp @@ -401,15 +401,11 @@ void idInventory::RestoreInventory( idPlayer *owner, const idDict &dict ) { // weapons are stored as a number for persistant data, but as strings in the entityDef weapons = dict.GetInt( "weapon_bits", "0" ); -#ifdef ID_DEMO_BUILD - Give( owner, dict, "weapon", dict.GetString( "weapon" ), NULL, false ); -#else if ( g_skill.GetInteger() >= 3 ) { Give( owner, dict, "weapon", dict.GetString( "weapon_nightmare" ), NULL, false ); } else { Give( owner, dict, "weapon", dict.GetString( "weapon" ), NULL, false ); } -#endif num = dict.GetInt( "levelTriggers" ); for ( i = 0; i < num; i++ ) { @@ -1589,12 +1585,11 @@ void idPlayer::Spawn( void ) { } else { g_damageScale.SetFloat( 1.0f ); g_armorProtection.SetFloat( ( g_skill.GetInteger() < 2 ) ? 0.4f : 0.2f ); -#ifndef ID_DEMO_BUILD + if ( g_skill.GetInteger() == 3 ) { healthTake = true; nextHealthTake = gameLocal.time + g_healthTakeTime.GetInteger() * 1000; } -#endif } } } @@ -3173,7 +3168,7 @@ void idPlayer::UpdatePowerUps( void ) { nextHealthPulse = gameLocal.time + HEALTHPULSE_TIME; healthPulse = true; } -#ifndef ID_DEMO_BUILD + if ( !gameLocal.inCinematic && influenceActive == 0 && g_skill.GetInteger() == 3 && gameLocal.time > nextHealthTake && !AI_DEAD && health > g_healthTakeLimit.GetInteger() ) { assert( !gameLocal.isClient ); // healthPool never be set on client health -= g_healthTakeAmt.GetInteger(); @@ -3183,7 +3178,6 @@ void idPlayer::UpdatePowerUps( void ) { nextHealthTake = gameLocal.time + g_healthTakeTime.GetInteger() * 1000; healthTake = true; } -#endif } /* diff --git a/game/Target.cpp b/game/Target.cpp index 8c64bb1..1912a78 100644 --- a/game/Target.cpp +++ b/game/Target.cpp @@ -196,19 +196,12 @@ idTarget_EndLevel::Event_Activate void idTarget_EndLevel::Event_Activate( idEntity *activator ) { idStr nextMap; -#ifdef ID_DEMO_BUILD - if ( spawnArgs.GetBool( "endOfGame" ) ) { - cvarSystem->SetCVarBool( "g_nightmare", true ); - gameLocal.sessionCommand = "endofDemo"; - return; - } -#else if ( spawnArgs.GetBool( "endOfGame" ) ) { cvarSystem->SetCVarBool( "g_nightmare", true ); gameLocal.sessionCommand = "disconnect"; return; } -#endif + if ( !spawnArgs.GetString( "nextMap", "", nextMap ) ) { gameLocal.Printf( "idTarget_SessionCommand::Event_Activate: no nextMap key\n" ); return; diff --git a/game/gamesys/SysCmds.cpp b/game/gamesys/SysCmds.cpp index 9645b8d..670a90c 100644 --- a/game/gamesys/SysCmds.cpp +++ b/game/gamesys/SysCmds.cpp @@ -2380,7 +2380,6 @@ void idGameLocal::InitConsoleCommands( void ) { cmdSystem->AddCommand( "clearLights", Cmd_ClearLights_f, CMD_FL_GAME|CMD_FL_CHEAT, "clears all lights" ); cmdSystem->AddCommand( "gameError", Cmd_GameError_f, CMD_FL_GAME|CMD_FL_CHEAT, "causes a game error" ); -#ifndef ID_DEMO_BUILD cmdSystem->AddCommand( "disasmScript", Cmd_DisasmScript_f, CMD_FL_GAME|CMD_FL_CHEAT, "disassembles script" ); cmdSystem->AddCommand( "recordViewNotes", Cmd_RecordViewNotes_f, CMD_FL_GAME|CMD_FL_CHEAT, "record the current view position with notes" ); cmdSystem->AddCommand( "showViewNotes", Cmd_ShowViewNotes_f, CMD_FL_GAME|CMD_FL_CHEAT, "show any view notes for the current map, successive calls will cycle to the next note" ); @@ -2400,7 +2399,6 @@ void idGameLocal::InitConsoleCommands( void ) { cmdSystem->AddCommand( "serverMapRestart", idGameLocal::MapRestart_f, CMD_FL_GAME, "restart the current game" ); cmdSystem->AddCommand( "serverForceReady", idMultiplayerGame::ForceReady_f,CMD_FL_GAME, "force all players ready" ); cmdSystem->AddCommand( "serverNextMap", idGameLocal::NextMap_f, CMD_FL_GAME, "change to the next map" ); -#endif // localization help commands cmdSystem->AddCommand( "nextGUI", Cmd_NextGUI_f, CMD_FL_GAME|CMD_FL_CHEAT, "teleport the player to the next func_static with a gui" );