mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-08 08:42:31 +00:00
models: support Anachronox 14 version
This commit is contained in:
parent
9566ef12c4
commit
5bcb204623
2 changed files with 5 additions and 2 deletions
|
@ -1707,7 +1707,8 @@ Mod_LoadModel_MD2Anox(const char *mod_name, const void *buffer, int modfilelen,
|
||||||
((int *)&pinmodel)[i] = LittleLong(((int *)buffer)[i]);
|
((int *)&pinmodel)[i] = LittleLong(((int *)buffer)[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pinmodel.version != ALIAS_ANACHRONOX_VERSION)
|
if (pinmodel.version != ALIAS_ANACHRONOX_VERSION &&
|
||||||
|
pinmodel.version != ALIAS_ANACHRONOX_VERSION_OLD)
|
||||||
{
|
{
|
||||||
R_Printf(PRINT_ALL, "%s: %s has wrong version number (%i should be %i)\n",
|
R_Printf(PRINT_ALL, "%s: %s has wrong version number (%i should be %i)\n",
|
||||||
__func__, mod_name, pinmodel.version, ALIAS_ANACHRONOX_VERSION);
|
__func__, mod_name, pinmodel.version, ALIAS_ANACHRONOX_VERSION);
|
||||||
|
@ -3244,7 +3245,8 @@ Mod_LoadModelFile(const char *mod_name, const void *buffer, int modfilelen,
|
||||||
short version;
|
short version;
|
||||||
|
|
||||||
version = LittleShort(((short*)buffer)[2]);
|
version = LittleShort(((short*)buffer)[2]);
|
||||||
if (version == ALIAS_ANACHRONOX_VERSION)
|
if (version == ALIAS_ANACHRONOX_VERSION ||
|
||||||
|
version == ALIAS_ANACHRONOX_VERSION_OLD)
|
||||||
{
|
{
|
||||||
extradata = Mod_LoadModel_MD2Anox(mod_name, buffer, modfilelen,
|
extradata = Mod_LoadModel_MD2Anox(mod_name, buffer, modfilelen,
|
||||||
skins, numskins, type);
|
skins, numskins, type);
|
||||||
|
|
|
@ -225,6 +225,7 @@ typedef struct
|
||||||
/* .MD2 Anachronox triangle model file format */
|
/* .MD2 Anachronox triangle model file format */
|
||||||
|
|
||||||
#define MDAHEADER (('1' << 24) + ('A' << 16) + ('D' << 8) + 'M')
|
#define MDAHEADER (('1' << 24) + ('A' << 16) + ('D' << 8) + 'M')
|
||||||
|
#define ALIAS_ANACHRONOX_VERSION_OLD 14
|
||||||
#define ALIAS_ANACHRONOX_VERSION 15
|
#define ALIAS_ANACHRONOX_VERSION 15
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
|
Loading…
Reference in a new issue