mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-26 12:21:19 +00:00
Played TD's Stormy Streets enough to know precipitation sprites didn't get an overflow test of their own
(various large invisible blocks used in the level cause rain to make splashes high above the main level, high enough to make ghostly rain splash sprite artifacts appear sometimes in nearby areas)
This commit is contained in:
parent
591fe13cc0
commit
b0f4bbb44b
1 changed files with 6 additions and 0 deletions
|
@ -891,12 +891,18 @@ static void R_DrawPrecipitationVisSprite(vissprite_t *vis)
|
||||||
#endif
|
#endif
|
||||||
fixed_t frac;
|
fixed_t frac;
|
||||||
patch_t *patch;
|
patch_t *patch;
|
||||||
|
INT64 overflow_test;
|
||||||
|
|
||||||
//Fab : R_InitSprites now sets a wad lump number
|
//Fab : R_InitSprites now sets a wad lump number
|
||||||
patch = W_CacheLumpNum(vis->patch, PU_CACHE);
|
patch = W_CacheLumpNum(vis->patch, PU_CACHE);
|
||||||
if (!patch)
|
if (!patch)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// Check for overflow
|
||||||
|
overflow_test = (INT64)centeryfrac - (((INT64)vis->texturemid*vis->scale)>>FRACBITS);
|
||||||
|
if (overflow_test < 0) overflow_test = -overflow_test;
|
||||||
|
if ((UINT64)overflow_test&0xFFFFFFFF80000000ULL) return; // fixed point mult would overflow
|
||||||
|
|
||||||
if (vis->transmap)
|
if (vis->transmap)
|
||||||
{
|
{
|
||||||
colfunc = fuzzcolfunc;
|
colfunc = fuzzcolfunc;
|
||||||
|
|
Loading…
Reference in a new issue