shithub: choc

Download patch

ref: ea5f633fe42c7693e30106a306b376ec169a4809
parent: ad3e1a25f971bea771960bb9efee75a277e56e2c
author: Fabian Greffrath <fabian@greffrath.com>
date: Thu Dec 18 05:53:49 EST 2014

fix a bug that causes monsters to become partly invisible

when walking inside liquids like water -- on big-endian systems

Originally reported by Ronald Lasmanowicz and fixed in his
wii-hexen port: https://code.google.com/p/wii-hexen/source/detail?r=17

--- a/src/heretic/r_things.c
+++ b/src/heretic/r_things.c
@@ -417,7 +417,7 @@
 
     if (vis->footclip && !vis->psprite)
     {
-        sprbotscreen = sprtopscreen + FixedMul(patch->height << FRACBITS,
+        sprbotscreen = sprtopscreen + FixedMul(SHORT(patch->height) << FRACBITS,
                                                spryscale);
         baseclip = (sprbotscreen - FixedMul(vis->footclip << FRACBITS,
                                             spryscale)) >> FRACBITS;
--- a/src/hexen/r_things.c
+++ b/src/hexen/r_things.c
@@ -426,7 +426,7 @@
 
     if (vis->floorclip && !vis->psprite)
     {
-        sprbotscreen = sprtopscreen + FixedMul(patch->height << FRACBITS,
+        sprbotscreen = sprtopscreen + FixedMul(SHORT(patch->height) << FRACBITS,
                                                spryscale);
         baseclip = (sprbotscreen - FixedMul(vis->floorclip,
                                             spryscale)) >> FRACBITS;
--- a/src/strife/r_things.c
+++ b/src/strife/r_things.c
@@ -470,7 +470,7 @@
     // villsa [STRIFE] clip sprite's feet if needed
     if(vis->mobjflags & MF_FEETCLIPPED)
     {
-        sprbotscreen = sprtopscreen + FixedMul(spryscale, patch->height << FRACBITS);
+        sprbotscreen = sprtopscreen + FixedMul(spryscale, SHORT(patch->height) << FRACBITS);
         clip = (sprbotscreen - FixedMul(10*FRACUNIT, spryscale)) >> FRACBITS;
     }
     else