mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-30 16:54:29 +00:00
engine: fixes for dedicated
This commit is contained in:
parent
9ff6d44178
commit
d30605c09f
@ -1065,7 +1065,9 @@ void Mod_LoadStudioModel( model_t *mod, const void *buffer, qboolean *loaded )
|
||||
}
|
||||
else
|
||||
{
|
||||
#if !XASH_DEDICATED
|
||||
ref.dllFuncs.Mod_StudioLoadTextures( mod, thdr );
|
||||
#endif
|
||||
|
||||
// give space for textures and skinrefs
|
||||
size1 = thdr->numtextures * sizeof( mstudiotexture_t );
|
||||
@ -1092,7 +1094,9 @@ void Mod_LoadStudioModel( model_t *mod, const void *buffer, qboolean *loaded )
|
||||
loadmodel->cache.data = Mem_Calloc( loadmodel->mempool, phdr->length );
|
||||
memcpy( loadmodel->cache.data, buffer, phdr->length );
|
||||
phdr = (studiohdr_t *)loadmodel->cache.data; // get the new pointer on studiohdr
|
||||
#if !XASH_DEDICATED
|
||||
ref.dllFuncs.Mod_StudioLoadTextures( mod, phdr );
|
||||
#endif
|
||||
|
||||
// NOTE: we wan't keep raw textures in memory. just cutoff model pointer above texture base
|
||||
loadmodel->cache.data = Mem_Realloc( loadmodel->mempool, loadmodel->cache.data, phdr->texturedataindex );
|
||||
|
@ -73,6 +73,7 @@ int PM_SampleMiptex( const msurface_t *surf, const vec3_t point )
|
||||
|
||||
// TODO: this won't work under dedicated
|
||||
// should we bring up imagelib and keep original buffers?
|
||||
#if !XASH_DEDICATED
|
||||
if( !Host_IsDedicated() )
|
||||
{
|
||||
const byte *data;
|
||||
@ -94,6 +95,7 @@ int PM_SampleMiptex( const msurface_t *surf, const vec3_t point )
|
||||
return CONTENTS_EMPTY;
|
||||
return CONTENTS_SOLID;
|
||||
}
|
||||
#endif // !XASH_DEDICATED
|
||||
|
||||
return contents;
|
||||
}
|
||||
|
@ -21,7 +21,11 @@ GNU General Public License for more details.
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
|
||||
#include "build.h"
|
||||
|
||||
#ifdef XASH_MSVC
|
||||
#pragma warning(disable : 4201) // nonstandard extension used
|
||||
#endif
|
||||
|
||||
// euler angle order
|
||||
#define PITCH 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user