mirror of
https://github.com/XProger/OpenLara.git
synced 2025-08-17 10:30:47 +02:00
fix for ambient cube sector check, fix flame emitters
This commit is contained in:
@@ -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);
|
||||||
|
@@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user