mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Add scale field for skel header
This commit is contained in:
parent
d400d8927d
commit
2cf380c15d
2 changed files with 11 additions and 0 deletions
|
@ -267,6 +267,7 @@ typedef struct skelHeaderGame_s {
|
|||
struct lodControl_s *pLOD;
|
||||
int numMorphTargets;
|
||||
char *pMorphTargets;
|
||||
float scale;
|
||||
} skelHeaderGame_t;
|
||||
|
||||
typedef struct boneData_s {
|
||||
|
|
|
@ -236,6 +236,16 @@ void TIKI_CacheFileSkel(skelHeader_t *pHeader, skelcache_t *cache, int length)
|
|||
byte *ptr = start_ptr + sizeof(skelHeaderGame_t);
|
||||
|
||||
pSkel->version = pHeader->version;
|
||||
|
||||
//
|
||||
// Added in 2.0
|
||||
//
|
||||
if (pHeader->version >= TIKI_SKD_HEADER_VERSION) {
|
||||
pSkel->scale = pHeader->scale * 0.52;
|
||||
} else {
|
||||
pSkel->scale = 0.52;
|
||||
}
|
||||
|
||||
pSkel->numSurfaces = pHeader->numSurfaces;
|
||||
pSkel->numBones = pHeader->numBones;
|
||||
pSkel->pSurfaces = (skelSurfaceGame_t *)ptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue