Fixed a bug were loading a map in radiant wouldn't clear the new cache.

This commit is contained in:
Justin Marshall
2026-04-25 09:30:10 -07:00
parent eacf47618f
commit 9af7c9ecdc
4 changed files with 12 additions and 6 deletions
+7 -3
View File
@@ -2343,10 +2343,14 @@ void CCamWnd::FreeRendererState() {
s_editorEntityStates.RemoveIndex(i);
}
for (entity_t* ent = entities.next; ent != &entities; ent = ent->next) {
ent->modelDef = -1;
ent->lightDef = -1;
if (entities.next != NULL)
{
for (entity_t* ent = entities.next; ent != &entities; ent = ent->next) {
ent->modelDef = -1;
ent->lightDef = -1;
}
}
for (int i = s_editorBModelStates.Num() - 1; i >= 0; i--) {
EditorFreeBModelState(i);
+2 -2
View File
@@ -129,6 +129,8 @@ public:
m_Camera.angles = angles;
}
bool CullBrush(brush_t* b, bool cubicOnly);
void FreeRendererState();
protected:
void Cam_Init();
void Cam_BuildMatrix();
@@ -138,7 +140,6 @@ protected:
void Cam_MouseUp (int x, int y, int buttons);
void Cam_MouseMoved (int x, int y, int buttons);
void InitCull();
bool CullBrush (brush_t *b, bool cubicOnly);
void Cam_Draw();
void Cam_Render();
@@ -154,7 +155,6 @@ protected:
bool selectMode;
bool animationMode;
bool soundMode;
void FreeRendererState();
void UpdateCaption();
bool BuildBrushRenderData(brush_t *brush);
void DrawEntityData();
+1 -1
View File
@@ -3928,7 +3928,7 @@ void Control_Draw(brush_t *b) {
}
glColor4f(1, 1, .5, 1);
glBegin(GL_POLYGON);
glBegin(GL_QUADS);
for (i = 0; i < w->GetNumPoints(); i++) {
glVertex3fv( (*w)[i].ToFloatPtr() );
}
+2
View File
@@ -222,6 +222,8 @@ void Map_Free(void) {
}
}
g_pParentWnd->GetCamera()->FreeRendererState();
// clear all the render and sound system data
g_qeglobals.rw->InitFromMap( NULL );
g_qeglobals.sw->ClearAllSoundEmitters();