Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Host/Join CCMDs for easier netgame access #1927

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
fix shader duplication when loading GLDefs
RicardoLuis0 committed Jan 21, 2023
commit cfa326783629a742122feb8a408977312d3f05c2
4 changes: 4 additions & 0 deletions src/d_main.cpp
Original file line number Diff line number Diff line change
@@ -174,6 +174,7 @@ void G_BuildTiccmd (ticcmd_t* cmd);
void D_DoAdvanceDemo ();
void D_LoadWadSettings ();
void ParseGLDefs();
void ClearGLDefs();
void DrawFullscreenSubtitle(FFont* font, const char *text);
void D_Cleanup();
void FreeSBarInfoScript();
@@ -3048,6 +3049,9 @@ static int D_InitGame(const FIWADInfo* iwad_info, TArray<FString>& allwads, TArr
gameinfo.nokeyboardcheats = iwad_info->nokeyboardcheats;
gameinfo.ConfigName = iwad_info->Configname;

// make sure shaders/etc aren't loaded twice when restarting the engine
ClearGLDefs();

const char *v = Args->CheckValue("-rngseed");
if (v)
{
7 changes: 6 additions & 1 deletion src/r_data/gldefs.cpp
Original file line number Diff line number Diff line change
@@ -2016,7 +2016,6 @@ void LoadGLDefs(const char *defsLump)
InitializeActorLights(LightAssociations);
}


//==========================================================================
//
//
@@ -2053,3 +2052,9 @@ void ParseGLDefs()
ParseVavoomSkybox();
LoadGLDefs(defsLump);
}

void ClearGLDefs()
{
PostProcessShaders.Clear();
usershaders.Clear();
}