- 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

@ -479,7 +479,6 @@ void gl_InitData()
{
LineSpecials[157] = LS_SetGlobalFogParameter;
LineSpecials[159] = LS_Sector_SetPlaneReflection;
gl_InitModels();
AdjustSpriteOffsets();
}

View file

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

View file

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

View file

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

View file

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

View file

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