- eliminated global in_area variable.
Removing this made me realize that calling the renderers' FakeFlat functions from the automap is inherently unsafe with the recent refactorings because there is absolutely no guarantee that the data may actually still be defined when the automap is being drawn. So the best approach here is to give the automap its own FakeFlat function that runs independently of render data and assumptions of data preservation. This one can also be a lot simpler because it only needs the floor, not the ceiling info.
This commit is contained in:
parent
4c61048278
commit
d72623b9b5
14 changed files with 161 additions and 74 deletions
|
|
@ -85,7 +85,6 @@ EXTERN_CVAR (Bool, r_deathcamera)
|
|||
EXTERN_CVAR (Float, underwater_fade_scalar)
|
||||
|
||||
|
||||
extern int viewpitch;
|
||||
extern bool NoInterpolateView;
|
||||
|
||||
area_t in_area;
|
||||
|
|
@ -991,7 +990,6 @@ struct FGLInterface : public FRenderer
|
|||
void StartSerialize(FSerializer &arc) override;
|
||||
void EndSerialize(FSerializer &arc) override;
|
||||
void RenderTextureView (FCanvasTexture *self, AActor *viewpoint, int fov) override;
|
||||
sector_t *FakeFlat(sector_t *sec, sector_t *tempsec, int *floorlightlevel, int *ceilinglightlevel) override;
|
||||
void SetFogParams(int _fogdensity, PalEntry _outsidefogcolor, int _outsidefogdensity, int _skyfog) override;
|
||||
void PreprocessLevel() override;
|
||||
void CleanLevelData() override;
|
||||
|
|
@ -1165,25 +1163,6 @@ void FGLInterface::RenderTextureView (FCanvasTexture *tex, AActor *Viewpoint, in
|
|||
camtexcount++;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
sector_t *FGLInterface::FakeFlat(sector_t *sec, sector_t *tempsec, int *floorlightlevel, int *ceilinglightlevel)
|
||||
{
|
||||
if (floorlightlevel != NULL)
|
||||
{
|
||||
*floorlightlevel = sec->GetFloorLight ();
|
||||
}
|
||||
if (ceilinglightlevel != NULL)
|
||||
{
|
||||
*ceilinglightlevel = sec->GetCeilingLight ();
|
||||
}
|
||||
return gl_FakeFlat(sec, tempsec, false);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue