mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
Work around an issue with the remaster's e3m3.
This commit is contained in:
parent
90f1c061d2
commit
ecf20de618
1 changed files with 11 additions and 3 deletions
|
@ -1606,11 +1606,19 @@ static void Mod_LoadFaces (lump_t *l, qboolean bsp2)
|
||||||
|
|
||||||
if (Mod_ParseWorldspawnKey(loadmodel, "lightmap_scale", scalebuf, sizeof(scalebuf)))
|
if (Mod_ParseWorldspawnKey(loadmodel, "lightmap_scale", scalebuf, sizeof(scalebuf)))
|
||||||
{
|
{
|
||||||
i = atoi(scalebuf);
|
char *e;
|
||||||
|
i = strtol(scalebuf, &e, 10);
|
||||||
|
if (i < 0 || *e)
|
||||||
|
Con_Warning("Incorrect value for lightmap_scale field - %s - should be texels-per-luxel (and power-of-two), use 16 to match vanilla quake.\n", scalebuf);
|
||||||
|
else if (i == 0)
|
||||||
|
; //silently use default when its explicitly set to 0 or empty. a bogus value but oh well.
|
||||||
|
else
|
||||||
|
{
|
||||||
for(defaultshift = 0; i > 1; defaultshift++)
|
for(defaultshift = 0; i > 1; defaultshift++)
|
||||||
i >>= 1;
|
i >>= 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
loadmodel->surfaces = out;
|
loadmodel->surfaces = out;
|
||||||
loadmodel->numsurfaces = count;
|
loadmodel->numsurfaces = count;
|
||||||
|
|
Loading…
Reference in a new issue