diff --git a/src/cache.h b/src/cache.h index bfdd06a..a133f19 100644 --- a/src/cache.h +++ b/src/cache.h @@ -329,12 +329,12 @@ struct AmbientCache { int sz = clamp(z / 1024, 0, r.zSectors - 1); int sector = sx * r.zSectors + sz; - if (level->state.flags.flipped && r.alternateRoom > -1) - sector += r.xSectors * r.zSectors; - if (r.sectors[sector].floor == TR::NO_FLOOR) return NULL; + if (level->state.flags.flipped && r.alternateRoom > -1) + sector += r.xSectors * r.zSectors; + Cube *cube = &items[offsets[roomIndex] + sector]; if (cube->status == Cube::BLANK) addTask(roomIndex, sector); diff --git a/src/trigger.h b/src/trigger.h index 0de907c..6c173f2 100644 --- a/src/trigger.h +++ b/src/trigger.h @@ -135,7 +135,7 @@ struct Flame : Sprite { if (flame) { flame->owner = owner; - flame->jointIndex = jointIndex & jCount; + flame->jointIndex = jCount > 1 ? (jointIndex & jCount) : -1; } return flame; }