mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-11 08:06:06 +00:00
Merge branch 'fix-terrain-performance' into 'master'
Fix terrain performance See merge request KartKrew/Kart!521
This commit is contained in:
commit
192ca07acf
3 changed files with 7 additions and 4 deletions
|
|
@ -312,16 +312,13 @@ terrain_t *K_GetTerrainForTextureNum(INT32 textureNum)
|
|||
--------------------------------------------------*/
|
||||
terrain_t *K_GetTerrainForFlatNum(INT32 flatID)
|
||||
{
|
||||
levelflat_t *levelFlat = NULL;
|
||||
|
||||
if (flatID < 0 || flatID >= (signed)numlevelflats)
|
||||
{
|
||||
// Clearly invalid floor...
|
||||
return NULL;
|
||||
}
|
||||
|
||||
levelFlat = &levelflats[flatID];
|
||||
return K_GetTerrainForTextureName(levelFlat->name);
|
||||
return levelflats[flatID].terrain;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -661,6 +661,9 @@ flatfound:
|
|||
levelflat->u.flat.baselumpnum = LUMPERROR;
|
||||
}
|
||||
|
||||
levelflat->terrain =
|
||||
K_GetTerrainForTextureName(levelflat->name);
|
||||
|
||||
CONS_Debug(DBG_SETUP, "flat #%03d: %s\n", atoi(sizeu1(numlevelflats)), levelflat->name);
|
||||
|
||||
return ( numlevelflats++ );
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
#include "doomdata.h"
|
||||
#include "doomstat.h"
|
||||
#include "r_defs.h"
|
||||
#include "k_terrain.h"
|
||||
|
||||
// map md5, sent to players via PT_SERVERINFO
|
||||
extern unsigned char mapmd5[16];
|
||||
|
|
@ -71,6 +72,8 @@ typedef struct
|
|||
|
||||
UINT16 width, height;
|
||||
|
||||
terrain_t *terrain;
|
||||
|
||||
// for flat animation
|
||||
INT32 animseq; // start pos. in the anim sequence
|
||||
INT32 numpics;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue