diff --git a/polymer/eduke32/source/actors.c b/polymer/eduke32/source/actors.c index 1110558f7..ae2dbdd7a 100644 --- a/polymer/eduke32/source/actors.c +++ b/polymer/eduke32/source/actors.c @@ -4966,7 +4966,8 @@ ACTOR_STATIC void G_MoveMisc(void) // STATNUM 5 case NEON5__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; goto BOLT; @@ -6235,7 +6236,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3 // 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); sc->ceilingpal = s->owner>>8; @@ -6271,8 +6272,13 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3 } 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[0] = s->shade + (g_globalRandom&15); @@ -6323,6 +6329,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3 KILLIT(i); break; + } //BOSS case SE_5: