HL2: fix version check to be more precise regarding v19
This commit is contained in:
parent
bb3e6a3802
commit
5676b8b849
1 changed files with 4 additions and 3 deletions
|
@ -1358,7 +1358,8 @@ static qboolean VBSP_LoadLeafs (model_t *mod, qbyte *mod_base, vlump_t *l, int v
|
||||||
int count;
|
int count;
|
||||||
size_t insize = sizeof(*in);
|
size_t insize = sizeof(*in);
|
||||||
struct leaflightpoint_s *lightpoint = NULL;
|
struct leaflightpoint_s *lightpoint = NULL;
|
||||||
if (ver < 20)
|
|
||||||
|
if (ver == 19)
|
||||||
insize = 56; //older maps have some lighting info here.
|
insize = 56; //older maps have some lighting info here.
|
||||||
else
|
else
|
||||||
insize = 32;
|
insize = 32;
|
||||||
|
@ -1389,7 +1390,7 @@ static qboolean VBSP_LoadLeafs (model_t *mod, qbyte *mod_base, vlump_t *l, int v
|
||||||
mod->leafs = out;
|
mod->leafs = out;
|
||||||
mod->numleafs = count;
|
mod->numleafs = count;
|
||||||
|
|
||||||
if (ver < 20)
|
if (ver == 19)
|
||||||
{
|
{
|
||||||
prv->leaflight = plugfuncs->GMalloc(&mod->memgroup, sizeof(*out) * count);
|
prv->leaflight = plugfuncs->GMalloc(&mod->memgroup, sizeof(*out) * count);
|
||||||
lightpoint = plugfuncs->GMalloc(&mod->memgroup, sizeof(*lightpoint) * count);
|
lightpoint = plugfuncs->GMalloc(&mod->memgroup, sizeof(*lightpoint) * count);
|
||||||
|
@ -3722,7 +3723,7 @@ static void VBSP_LoadLeafLight (model_t *mod, qbyte *mod_base, vlump_t *hdridx,
|
||||||
unsigned short *in;
|
unsigned short *in;
|
||||||
qbyte *inpoint;
|
qbyte *inpoint;
|
||||||
|
|
||||||
if (version < 20)
|
if (version == 19)
|
||||||
return; //nope. this info is in the leafs.
|
return; //nope. this info is in the leafs.
|
||||||
|
|
||||||
if (hdridx && hdrvals)
|
if (hdridx && hdrvals)
|
||||||
|
|
Loading…
Reference in a new issue