mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00:00
Fix sprite loading
This commit is contained in:
parent
4247af8fa8
commit
31ab710485
@ -34,7 +34,6 @@ void Mod_LoadSpriteModel( model_t *mod, const void *buffer, qboolean *loaded, ui
|
|||||||
dsprite_q1_t *pinq1;
|
dsprite_q1_t *pinq1;
|
||||||
dsprite_hl_t *pinhl;
|
dsprite_hl_t *pinhl;
|
||||||
dsprite_t *pin;
|
dsprite_t *pin;
|
||||||
short *numi = NULL;
|
|
||||||
msprite_t *psprite;
|
msprite_t *psprite;
|
||||||
int i, size;
|
int i, size;
|
||||||
|
|
||||||
@ -80,7 +79,6 @@ void Mod_LoadSpriteModel( model_t *mod, const void *buffer, qboolean *loaded, ui
|
|||||||
mod->maxs[0] = mod->maxs[1] = pinq1->bounds[0] * 0.5f;
|
mod->maxs[0] = mod->maxs[1] = pinq1->bounds[0] * 0.5f;
|
||||||
mod->mins[2] = -pinq1->bounds[1] * 0.5f;
|
mod->mins[2] = -pinq1->bounds[1] * 0.5f;
|
||||||
mod->maxs[2] = pinq1->bounds[1] * 0.5f;
|
mod->maxs[2] = pinq1->bounds[1] * 0.5f;
|
||||||
numi = NULL;
|
|
||||||
}
|
}
|
||||||
else if( i == SPRITE_VERSION_HL )
|
else if( i == SPRITE_VERSION_HL )
|
||||||
{
|
{
|
||||||
@ -100,7 +98,6 @@ void Mod_LoadSpriteModel( model_t *mod, const void *buffer, qboolean *loaded, ui
|
|||||||
mod->maxs[0] = mod->maxs[1] = pinhl->bounds[0] * 0.5f;
|
mod->maxs[0] = mod->maxs[1] = pinhl->bounds[0] * 0.5f;
|
||||||
mod->mins[2] = -pinhl->bounds[1] * 0.5f;
|
mod->mins[2] = -pinhl->bounds[1] * 0.5f;
|
||||||
mod->maxs[2] = pinhl->bounds[1] * 0.5f;
|
mod->maxs[2] = pinhl->bounds[1] * 0.5f;
|
||||||
numi = (short *)(pinhl + 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( Host_IsDedicated() )
|
if( Host_IsDedicated() )
|
||||||
|
@ -144,13 +144,19 @@ load sprite model
|
|||||||
*/
|
*/
|
||||||
void Mod_LoadSpriteModel( model_t *mod, const void *buffer, qboolean *loaded, uint texFlags )
|
void Mod_LoadSpriteModel( model_t *mod, const void *buffer, qboolean *loaded, uint texFlags )
|
||||||
{
|
{
|
||||||
dsprite_q1_t *pinq1;
|
|
||||||
dsprite_hl_t *pinhl;
|
|
||||||
dsprite_t *pin;
|
dsprite_t *pin;
|
||||||
short *numi = NULL;
|
short *numi = NULL;
|
||||||
dframetype_t *pframetype;
|
dframetype_t *pframetype;
|
||||||
msprite_t *psprite;
|
msprite_t *psprite;
|
||||||
int i, size;
|
int i;
|
||||||
|
|
||||||
|
pin = buffer;
|
||||||
|
psprite = mod->cache.data;
|
||||||
|
|
||||||
|
if( pin->version == SPRITE_VERSION_Q1 || pin->version == SPRITE_VERSION_32 )
|
||||||
|
numi = NULL;
|
||||||
|
else if( pin->version == SPRITE_VERSION_HL )
|
||||||
|
numi = (short *)(buffer + sizeof( dsprite_hl_t ));
|
||||||
|
|
||||||
r_texFlags = texFlags;
|
r_texFlags = texFlags;
|
||||||
sprite_version = pin->version;
|
sprite_version = pin->version;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user