Get rid of ID_DEMO_BUILD

There are no demo pk4s compatible to this 1.3.1 codebase.
This commit is contained in:
dhewg 2012-07-02 00:02:40 +02:00 committed by Daniel Gibson
parent 2d43892ef3
commit e632cd030b
11 changed files with 10 additions and 57 deletions

View file

@ -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

View file

@ -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" );

View file

@ -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
}
/*

View file

@ -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;

View file

@ -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" );

View file

@ -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

View file

@ -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
// 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
// CD Key file info
// goes into BASE_GAMEDIR whatever the fs_game is set to

View file

@ -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" );

View file

@ -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
}
/*

View file

@ -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;

View file

@ -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" );