mirror of
https://github.com/jmarshall23/DoomRTX.git
synced 2026-08-12 08:11:10 +02:00
Fixed a bug were loading a map in radiant wouldn't clear the new cache.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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() );
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user