actors.c: fix 3 incorrect '/' -> tabledivide32_noinline rewrites in r4658.

Division has higher precedence than bitwise-OR.

The cases concerned SE3, SE4 and NEON* sprites.
Incidental info: the blinking of NEON* sprites can be controlled via their
lotag, similarly to how you how you give a "random flash number" as SE4 hitag.

git-svn-id: https://svn.eduke32.com/eduke32@5155 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2015-04-18 21:59:17 +00:00
parent 53d2e0939e
commit cf7de5b43a

View file

@ -4966,7 +4966,8 @@ ACTOR_STATIC void G_MoveMisc(void) // STATNUM 5
case NEON5__STATIC: case NEON5__STATIC:
case NEON6__STATIC: case NEON6__STATIC:
if (tabledivide32_noinline(g_globalRandom, (s->lotag+1)&31) > 4) s->shade = -127; if ((tabledivide32_noinline(g_globalRandom, s->lotag+1)&31) > 4)
s->shade = -127;
else s->shade = 127; else s->shade = 127;
goto BOLT; goto BOLT;
@ -6235,7 +6236,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
// if(t[5] > 0) { t[5]--; break; } // if(t[5] > 0) { t[5]--; break; }
if (tabledivide32_noinline(g_globalRandom, (sh+1)&31) < 4 && !t[2]) if ((tabledivide32_noinline(g_globalRandom, sh+1)&31) < 4 && !t[2])
{ {
// t[5] = 4+(g_globalRandom&7); // t[5] = 4+(g_globalRandom&7);
sc->ceilingpal = s->owner>>8; sc->ceilingpal = s->owner>>8;
@ -6271,8 +6272,13 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
} }
case SE_4_RANDOM_LIGHTS: case SE_4_RANDOM_LIGHTS:
{
// See A_Spawn():
// s->owner: original ((ceilingpal<<8) | floorpal)
// t[2]: original floor shade
// t[3]: max wall shade
if (tabledivide32_noinline(g_globalRandom, (sh+1)&31) < 4) if ((tabledivide32_noinline(g_globalRandom, sh+1)&31) < 4)
{ {
t[1] = s->shade + (g_globalRandom&15);//Got really bright t[1] = s->shade + (g_globalRandom&15);//Got really bright
t[0] = s->shade + (g_globalRandom&15); t[0] = s->shade + (g_globalRandom&15);
@ -6323,6 +6329,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
KILLIT(i); KILLIT(i);
break; break;
}
//BOSS //BOSS
case SE_5: case SE_5: