mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Classic: prevent visibility overflow on sloped ceilings/floors at large distances.
git-svn-id: https://svn.eduke32.com/eduke32@4453 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
8d9282bc24
commit
653c1b8acd
1 changed files with 10 additions and 4 deletions
|
@ -4416,10 +4416,16 @@ static void grouscan(int32_t dax1, int32_t dax2, int32_t sectnum, char dastat)
|
||||||
|
|
||||||
asm1 = -(globalzd>>(16-BITSOFPRECISION));
|
asm1 = -(globalzd>>(16-BITSOFPRECISION));
|
||||||
|
|
||||||
globvis = globalvisibility;
|
{
|
||||||
if (sec->visibility != 0) globvis = mulscale4(globvis, (uint8_t)(sec->visibility+16));
|
int32_t vis = globalvisibility;
|
||||||
globvis = mulscale13(globvis,daz);
|
int64_t lvis;
|
||||||
globvis = mulscale16(globvis,xdimscale);
|
|
||||||
|
if (sec->visibility != 0) vis = mulscale4(vis, (uint8_t)(sec->visibility+16));
|
||||||
|
lvis = ((uint64_t)vis*daz) >> 13;
|
||||||
|
lvis = (lvis * xdimscale) >> 16;
|
||||||
|
globvis = lvis > INT32_MAX ? INT32_MAX : lvis;
|
||||||
|
}
|
||||||
|
|
||||||
j = FP_OFF(palookup[globalpal]);
|
j = FP_OFF(palookup[globalpal]);
|
||||||
|
|
||||||
setupslopevlin_alsotrans((picsiz[globalpicnum]&15) + ((picsiz[globalpicnum]>>4)<<8),
|
setupslopevlin_alsotrans((picsiz[globalpicnum]&15) + ((picsiz[globalpicnum]>>4)<<8),
|
||||||
|
|
Loading…
Reference in a new issue