- initialize model data at engine start, not at level start.

This commit is contained in:
Christoph Oelckers 2014-06-19 15:22:00 +02:00
parent 412d6499d9
commit 3e9b9c280b
6 changed files with 8 additions and 14 deletions

View file

@ -477,9 +477,8 @@ void gl_RecalcVertexHeights(vertex_t * v)
void gl_InitData() void gl_InitData()
{ {
LineSpecials[157]=LS_SetGlobalFogParameter; LineSpecials[157] = LS_SetGlobalFogParameter;
LineSpecials[159]=LS_Sector_SetPlaneReflection; LineSpecials[159] = LS_Sector_SetPlaneReflection;
gl_InitModels();
AdjustSpriteOffsets(); AdjustSpriteOffsets();
} }

View file

@ -57,6 +57,7 @@ extern TArray<BYTE> currentmapsection;
void gl_InitPortals(); void gl_InitPortals();
void gl_BuildPortalCoverage(FPortalCoverage *coverage, subsector_t *subsector, FPortal *portal); void gl_BuildPortalCoverage(FPortalCoverage *coverage, subsector_t *subsector, FPortal *portal);
void gl_InitData();
extern long gl_frameMS; extern long gl_frameMS;

View file

@ -62,7 +62,6 @@
#include "gl/gl_functions.h" #include "gl/gl_functions.h"
void InitGLRMapinfoData(); void InitGLRMapinfoData();
void gl_InitData();
//========================================================================== //==========================================================================
// //
@ -613,15 +612,6 @@ void gl_PreprocessLevel()
{ {
int i; int i;
static int datadone=-1;
if (datadone != restart)
{
datadone = restart;
gl_InitData();
}
PrepareSegs(); PrepareSegs();
PrepareSectorData(); PrepareSectorData();
InitVertexData(); InitVertexData();

View file

@ -333,7 +333,6 @@ struct FSpriteModelFrame
class GLSprite; class GLSprite;
void gl_InitModels();
FSpriteModelFrame * gl_FindModelFrame(const PClass * ti, int sprite, int frame, bool dropped); FSpriteModelFrame * gl_FindModelFrame(const PClass * ti, int sprite, int frame, bool dropped);
void gl_RenderModel(GLSprite * spr); void gl_RenderModel(GLSprite * spr);

View file

@ -1224,6 +1224,7 @@ void FGLInterface::RenderView(player_t *player)
void FGLInterface::Init() void FGLInterface::Init()
{ {
gl_ParseDefs(); gl_ParseDefs();
gl_InitData();
} }
//=========================================================================== //===========================================================================

View file

@ -15,6 +15,8 @@
#include "r_data/voxels.h" #include "r_data/voxels.h"
#include "textures/textures.h" #include "textures/textures.h"
void gl_InitModels();
// variables used to look up // variables used to look up
// and range check thing_t sprites patches // and range check thing_t sprites patches
TArray<spritedef_t> sprites; TArray<spritedef_t> sprites;
@ -988,6 +990,8 @@ void R_InitSprites ()
// [RH] Sort the skins, but leave base as skin 0 // [RH] Sort the skins, but leave base as skin 0
//qsort (&skins[PlayerClasses.Size ()], numskins-PlayerClasses.Size (), sizeof(FPlayerSkin), skinsorter); //qsort (&skins[PlayerClasses.Size ()], numskins-PlayerClasses.Size (), sizeof(FPlayerSkin), skinsorter);
gl_InitModels();
} }
void R_DeinitSpriteData() void R_DeinitSpriteData()