Skip to content

Commit

Permalink
Removing Sikkmod
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.thedarkmod.com/svn/darkmod_src/trunk@6343 49c82d7f-2e2a-0410-a16f-ae8f201b507f
  • Loading branch information
stevel committed Dec 6, 2014
1 parent fd88b2f commit cd87e28
Show file tree
Hide file tree
Showing 30 changed files with 41 additions and 1,677 deletions.
1 change: 0 additions & 1 deletion framework/DeclParticle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ void idDeclParticle::GetStageBounds( idParticleStage *stage ) {
renderEntity_t renderEntity;
memset( &renderEntity, 0, sizeof( renderEntity ) );
renderEntity.axis = mat3_identity;
//renderEntity.suppressSurfaceInViewID = -8; // sikk

renderView_t renderView;
memset( &renderView, 0, sizeof( renderView ) );
Expand Down
46 changes: 4 additions & 42 deletions framework/Session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ idCVar idSessionLocal::com_aviDemoTics( "com_aviDemoTics", "2", CVAR_SYSTEM | CV
idCVar idSessionLocal::com_wipeSeconds( "com_wipeSeconds", "1", CVAR_SYSTEM, "" );
idCVar idSessionLocal::com_guid( "com_guid", "", CVAR_SYSTEM | CVAR_ARCHIVE | CVAR_ROM, "" );

//Obsttorte
idCVar idSessionLocal::saveGameName( "saveGameName", "", CVAR_GAME | CVAR_ROM, "");

idSessionLocal sessLocal;
idSession *session = &sessLocal;

Expand Down Expand Up @@ -1700,16 +1697,14 @@ void idSessionLocal::ScrubSaveGameFileName( idStr &saveFileName ) const {
idSessionLocal::SaveGame
===============
*/
bool idSessionLocal::SaveGame( const char *saveName, bool autosave, bool skipCheck ) {
bool idSessionLocal::SaveGame( const char *saveName, bool autosave ) {
#ifdef ID_DEDICATED
common->Printf( "Dedicated servers cannot save games.\n" );
return false;
#else
int i;
idStr gameFile, previewFile, descriptionFile, mapName;

gameFile = saveName; // Obsttorte: moved upwards as needed earlier

if ( !mapSpawned ) {
common->Printf( "Not playing a game.\n" );
return false;
Expand All @@ -1726,19 +1721,7 @@ bool idSessionLocal::SaveGame( const char *saveName, bool autosave, bool skipChe
common->Printf( "You must be alive to save the game\n" );
return false;
}
if (!skipCheck)
{
if (game->savegamesDisallowed())
{
common->Printf("Manual saving is disabled!\n");
return false;
}
if (game->quicksavesDisallowed() && gameFile == "Quicksave")
{
common->Printf("Quicksaves disabled!\n");
return false;
}
}

if ( Sys_GetDriveFreeSpace( cvarSystem->GetCVarString( "fs_savepath" ) ) < 25 ) {
// "Not eough space" and "Unable to save"
MessageBox( MSG_OK, common->Translate ( "#str_02014" ), common->Translate ( "#str_02013" ), true );
Expand All @@ -1752,8 +1735,8 @@ bool idSessionLocal::SaveGame( const char *saveName, bool autosave, bool skipChe
soundSystem->SetPlayingSoundWorld( NULL );
}

// setup up paths

// setup up filenames and paths
gameFile = saveName;
ScrubSaveGameFileName( gameFile );

gameFile = "savegames/" + gameFile;
Expand All @@ -1776,10 +1759,6 @@ bool idSessionLocal::SaveGame( const char *saveName, bool autosave, bool skipChe
return false;
}

// Obsttorte increment the savegame counter

game->incrementSaveCount();

// Write SaveGame Header:
// Game Name / Version / Map Name / Persistant Player Info

Expand Down Expand Up @@ -2685,23 +2664,6 @@ void idSessionLocal::RunGameTic() {
game->SetTime2Start();
loadDoneTime = 0;
}

// Obsttorte - check if we should save the game

idStr saveGameName = game->triggeredSave();
if (!saveGameName.IsEmpty())
{
if (cvarSystem->GetCVarBool("tdm_nosave"))
{
cvarSystem->SetCVarBool("tdm_nosave",false);
SaveGame(saveGameName.c_str());
cvarSystem->SetCVarBool("tdm_nosave",true);
}
else
{
SaveGame(saveGameName.c_str(), false, true);
}
}

// run the game logic every player move
int start = Sys_Milliseconds();
Expand Down
5 changes: 1 addition & 4 deletions framework/Session_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class idSessionLocal : public idSession {
idStr GetAutoSaveName( const char *mapName ) const;

bool LoadGame(const char *saveName);
bool SaveGame(const char *saveName, bool autosave = false, bool skipCheck = false);
bool SaveGame(const char *saveName, bool autosave = false);

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

Expand All @@ -153,9 +153,6 @@ class idSessionLocal : public idSession {

static idCVar gui_configServerRate;

//Obsttorte: cvar for disabling manual saves
static idCVar saveGameName;

int timeHitch;

bool menuActive;
Expand Down
11 changes: 1 addition & 10 deletions game/Entity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,6 @@ idEntity::idEntity()
fl.neverDormant = true; // most entities never go dormant

memset( &renderEntity, 0, sizeof( renderEntity ) );
memset( &renderLight, 0, sizeof(renderLight));
modelDefHandle = -1;
memset( &refSound, 0, sizeof( refSound ) );

Expand Down Expand Up @@ -1769,14 +1768,7 @@ void idEntity::LoadModels()
spawnArgs.GetString( "model", "", model );

if ( !model.IsEmpty() ) {
SetModel( model );
if (model.Find(".prt")>=0)
{
// sikk---> Depth Render
renderEntity.suppressSurfaceInViewID = -8;
// <---sikk
}

SetModel( model );
}

// was a brokenModel requested?
Expand Down Expand Up @@ -2866,7 +2858,6 @@ bool idEntity::SwitchLOD()
if (m_LOD->noshadowsLOD != 0) // SteveL #3744
{
renderEntity.noShadow = (m_LOD->noshadowsLOD & (1 << m_LODLevel)) > 0 ? 1 : 0;
renderLight.noShadows = (m_LOD->noshadowsLOD & (1 << m_LODLevel)) > 0 ? 1 : 0;
}


Expand Down
1 change: 0 additions & 1 deletion game/Entity.h
Original file line number Diff line number Diff line change
Expand Up @@ -1393,7 +1393,6 @@ class idEntity : public idClass {

protected:
renderEntity_t renderEntity; //!< used to present a model to the renderer
renderLight_t renderLight;
int modelDefHandle; //!< handle to static renderer model
refSound_t refSound; //!< used to present sound to the audio engine
idStr brokenModel; //!< model set when health drops down to or below zero
Expand Down
8 changes: 1 addition & 7 deletions game/FX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ void idEntityFx::Run( int time ) {
useAction = &actions[fxaction.sibling];
}
assert( useAction );
useAction->renderEntity.suppressSurfaceInViewID = -8; // sikk - depth render

switch( fxaction.type ) {
case FX_ATTACHLIGHT:
case FX_LIGHT: {
Expand Down Expand Up @@ -497,9 +497,6 @@ void idEntityFx::Run( int time ) {
useAction->renderEntity.shaderParms[ SHADERPARM_TIMEOFFSET ] = -MS2SEC( time );
useAction->renderEntity.shaderParms[3] = 1.0f;
useAction->renderEntity.shaderParms[5] = 0.0f;



if ( useAction->renderEntity.hModel ) {
useAction->renderEntity.bounds = useAction->renderEntity.hModel->Bounds( &useAction->renderEntity );
}
Expand Down Expand Up @@ -584,9 +581,6 @@ void idEntityFx::Spawn( void ) {
PostEventMS( &EV_Activate, 0, this );
}
}

// We don't want particles in depth render.
renderEntity.suppressSurfaceInViewID = -8; // sikk - Depth Render
}

/*
Expand Down
4 changes: 0 additions & 4 deletions game/Game_local.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,6 @@ void idGameLocal::Clear( void )

m_ambientLights.Clear(); // grayman #3584

currentLights.Clear(); // sikk - Soft Shadows PostProcess

}

// grayman #3807
Expand Down Expand Up @@ -1585,8 +1583,6 @@ void idGameLocal::LoadMap( const char *mapName, int randseed ) {
playerPVS.i = -1;
playerConnectedAreas.i = -1;

currentLights.Clear(); // sikk - Soft Shadows PostProcess

// load navigation system for all the different monster sizes
for( i = 0; i < aasNames.Num(); i++ ) {
aasList[ i ]->Init( idStr( mapFileName ).SetFileExtension( aasNames[ i ] ).c_str(), mapFile->GetGeometryCRC() );
Expand Down
3 changes: 0 additions & 3 deletions game/Game_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -689,9 +689,6 @@ class idGameLocal : public idGame {
idEntityPtr<idEntity> lastGUIEnt; // last entity with a GUI, used by Cmd_NextGUI_f
int lastGUI; // last GUI on the lastGUIEnt

idList<int> currentLights; // sikk - Soft Shadows PostProcess
bool ambientOn;

idEntityPtr<idEntity> portalSkyEnt;
bool portalSkyActive;

Expand Down
41 changes: 2 additions & 39 deletions game/Light.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -443,13 +443,6 @@ void idLight::Restore( idRestoreGame *savefile ) {

// Re-acquire light material, now that the material name is known
m_LightMaterial = g_Global.GetMaterial(m_MaterialName);

// sikk---> Soft Shadows PostProcess
// only put lights that cast shadows into the list
if ( spawnArgs.GetInt( "noshadows" ) == 0 ) {
gameLocal.currentLights.Append( entityNumber );
}
// <---sikk
}

/*
Expand Down Expand Up @@ -491,7 +484,6 @@ void idLight::Spawn( void )
// also put the light texture on the model, so light flares
// can get the current intensity of the light
renderEntity.referenceShader = renderLight.shader;
renderEntity.suppressSurfaceInViewID = -8; // sikk - depth render

lightDefHandle = -1; // no static version yet

Expand Down Expand Up @@ -531,13 +523,6 @@ void idLight::Spawn( void )

PostEventMS( &EV_PostSpawn, 0 );

// sikk---> Soft Shadows PostProcess
// only put lights that cast shadows into the list
if ( spawnArgs.GetInt( "noshadows" ) == 0) {
gameLocal.currentLights.Append( entityNumber );
}
// <---sikk

UpdateVisuals();

if ( renderLight.pointLight == true )
Expand Down Expand Up @@ -797,7 +782,7 @@ void idLight::On( void )
StartSoundShader( refSound.shader, SND_CHANNEL_ANY, 0, false, NULL );
soundWasPlaying = false;
}
renderEntity.suppressSurfaceInViewID = -8; // sikk - depth render

const function_t* func = scriptObject.GetFunction("LightsOn");
if (func == NULL)
{
Expand Down Expand Up @@ -1069,7 +1054,6 @@ DM_LOG(LC_FUNCTION, LT_DEBUG)LOGSTRING("this: %08lX [%s] Radius ( %0.3f / %0.3f
renderLight.lightRadius[1], // y
renderLight.lightRadius[2]); // z
*/
renderEntity.suppressSurfaceInViewID = -8; // sikk - depth render
// let the renderer apply it to the world
if ( ( lightDefHandle != -1 ) ) {
gameRenderWorld->UpdateLightDef( lightDefHandle, &renderLight );
Expand All @@ -1088,7 +1072,6 @@ void idLight::PresentModelDefChange( void ) {
if ( !renderEntity.hModel || IsHidden() ) {
return;
}
renderEntity.suppressSurfaceInViewID = -8; // sikk - depth render
// add to refresh list
if ( modelDefHandle == -1 ) {
modelDefHandle = gameRenderWorld->AddEntityDef( &renderEntity );
Expand All @@ -1107,7 +1090,6 @@ void idLight::Present( void ) {
if ( !( thinkFlags & TH_UPDATEVISUALS ) ) {
return;
}
renderEntity.suppressSurfaceInViewID = -8; // sikk - depth render
// Clear the bounds, so idLight::PresentRenderTrigger() has a way to know
// if idEntity::PresentRenderTrigger() added anything.
m_renderTrigger.bounds.Clear();
Expand Down Expand Up @@ -1167,7 +1149,6 @@ idLight::Think
*/
void idLight::Think( void ) {
idVec4 color;
renderEntity.suppressSurfaceInViewID = -8; // sikk - depth render
if ( thinkFlags & TH_THINK )
{
if ( fadeEnd > 0 )
Expand Down Expand Up @@ -2220,22 +2201,4 @@ void idLight::Event_SetStartedOff() // grayman #2905 - the light was out at spaw
bool idLight::GetStartedOff() // grayman #2905 - was the light out at spawn time?
{
return startedOff;
}


// sikk---> Soft Shadows PostProcess
/*
================
idLight::UpdateShadowState
================
*/
void idLight::UpdateShadowState( void ) {
// let the renderer apply it to the world
if ( ( lightDefHandle != -1 ) ) {
gameRenderWorld->UpdateLightDef( lightDefHandle, &renderLight );

} else {
lightDefHandle = gameRenderWorld->AddLightDef( &renderLight );
}
}
// <---sikk
}
5 changes: 1 addition & 4 deletions game/Light.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,7 @@ class idLight : public idEntity {

bool GetStartedOff();

// sikk---> Soft Shadows PostProcess
renderLight_t* GetRenderLight( void ) { return &renderLight; };
void UpdateShadowState( void );
// <---sikk
renderLight_t* GetRenderLight( void ) { return &renderLight; }

private:
renderLight_t renderLight; // light presented to the renderer
Expand Down
1 change: 0 additions & 1 deletion game/LightGem.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ class LightGem

private:
void AnalyzeRenderImage ( );
void ToggleShadows(bool noShadows);
};

#endif // __LIGHTGEM_H__
5 changes: 0 additions & 5 deletions game/Misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1740,11 +1740,6 @@ void idStaticEntity::Spawn( void ) {

// we want the parametric particles out of sync with each other
renderEntity.shaderParms[ SHADERPARM_TIMEOFFSET ] = gameLocal.random.RandomInt( 32767 );

// sikk---> Depth Render
renderEntity.suppressSurfaceInViewID = -8;
renderEntity.noShadow = 1;
// <---sikk
}

fadeFrom.Set( 1, 1, 1, 1 );
Expand Down
2 changes: 0 additions & 2 deletions game/Moveable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1334,8 +1334,6 @@ void idExplodingBarrel::AddParticles( const char *name, bool burn ) {
particleRenderEntity.shaderParms[ SHADERPARM_TIMEOFFSET ] = -MS2SEC( gameLocal.realClientTime );
particleRenderEntity.shaderParms[ SHADERPARM_DIVERSITY ] = ( burn ) ? 1.0f : gameLocal.random.RandomInt( 90 );

particleRenderEntity.suppressSurfaceInViewID = -8; // sikk - Depth Render

if ( !particleRenderEntity.hModel ) {
particleRenderEntity.hModel = renderModelManager->FindModel( name );
}
Expand Down
Loading

0 comments on commit cd87e28

Please sign in to comment.