1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-08-16 10:04:28 +02:00

fix for ambient cube sector check, fix flame emitters

This commit is contained in:
XProger
2018-09-26 04:11:26 +03:00
parent b00797c1bc
commit 50339b874c
2 changed files with 4 additions and 4 deletions

View File

@@ -329,12 +329,12 @@ struct AmbientCache {
int sz = clamp(z / 1024, 0, r.zSectors - 1); int sz = clamp(z / 1024, 0, r.zSectors - 1);
int sector = sx * r.zSectors + sz; 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) if (r.sectors[sector].floor == TR::NO_FLOOR)
return NULL; return NULL;
if (level->state.flags.flipped && r.alternateRoom > -1)
sector += r.xSectors * r.zSectors;
Cube *cube = &items[offsets[roomIndex] + sector]; Cube *cube = &items[offsets[roomIndex] + sector];
if (cube->status == Cube::BLANK) if (cube->status == Cube::BLANK)
addTask(roomIndex, sector); addTask(roomIndex, sector);

View File

@@ -135,7 +135,7 @@ struct Flame : Sprite {
if (flame) { if (flame) {
flame->owner = owner; flame->owner = owner;
flame->jointIndex = jointIndex & jCount; flame->jointIndex = jCount > 1 ? (jointIndex & jCount) : -1;
} }
return flame; return flame;
} }