Fix taking over floor pal in the unlikely event that no fog pals are defined.

This DOES NOT fix the more complex issue discussed at the forums.

git-svn-id: https://svn.eduke32.com/eduke32@4592 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2014-09-07 18:10:18 +00:00
parent 43fd10a7ac
commit ef8c2f14c4
2 changed files with 2 additions and 2 deletions

View file

@ -10285,7 +10285,7 @@ void ExtAnalyzeSprites(int32_t ourx, int32_t oury, int32_t oura, int32_t smoothr
// 1st rule
// Compare with game.c:G_MaybeTakeOnFloorPal()
if (fpal > 0 && g_firstFogPal > 0 && !(fpal >= g_firstFogPal && fpal <= g_firstFogPal+3))
if (fpal > 0 && (!g_firstFogPal || !(fpal >= g_firstFogPal && fpal <= g_firstFogPal+3)))
tspr->pal = fpal;
// 2nd and 3rd rule minus "actor condition"

View file

@ -7036,7 +7036,7 @@ static int32_t G_MaybeTakeOnFloorPal(spritetype *datspr, int32_t sect)
{
int32_t dapal = sector[sect].floorpal;
if (dapal && g_firstFogPal && !(dapal >= g_firstFogPal && dapal <= g_firstFogPal+3)
if (dapal && (!g_firstFogPal || !(dapal >= g_firstFogPal && dapal <= g_firstFogPal+3))
&& !g_noFloorPal[dapal]
&& !A_CheckSpriteFlags(datspr->owner,SFLAG_NOPAL))
{