diff --git a/src/camera.h b/src/camera.h index 184d331..ad8cf12 100644 --- a/src/camera.h +++ b/src/camera.h @@ -205,7 +205,7 @@ struct Camera : ICamera { uint16 cameraBoxIndex = level->getSector(to.room, to.pos)->boxIndex; if (ownerBoxIndex == TR::NO_BOX) { - ASSERT(false); + ASSERT(false); // TODO: collide death AABB with walls return; } diff --git a/src/format.h b/src/format.h index 33ad8ba..cddb903 100644 --- a/src/format.h +++ b/src/format.h @@ -2286,7 +2286,7 @@ namespace TR { uint16 *meshData; int32 meshOffsetsCount; - uint32 *meshOffsets; + int32 *meshOffsets; int32 animsCount; Animation *anims; @@ -4154,8 +4154,7 @@ namespace TR { int16 getModelIndex(Entity::Type type) const { //#ifndef _DEBUG if ((type >= Entity::AI_GUARD && type <= Entity::AI_CHECK) || - (type >= Entity::GLOW_2 && type <= Entity::ENEMY_BAT_SWARM) || - (type == Entity::TRAP_FLAME_EMITTER || type == Entity::MIDAS_HAND) || + (type >= Entity::GLOW_2 && type <= Entity::ENEMY_BAT_SWARM) || type == Entity::WATERFALL || type == Entity::KILL_ALL_TRIGGERS || type == Entity::VIEW_TARGET || type == Entity::SOUND_DOOR_BELL || type == Entity::SOUND_ALARM_BELL || type == Entity::TRIPWIRE) return 0; //#endif diff --git a/src/mesh.h b/src/mesh.h index cbb5c51..5ac78ff 100644 --- a/src/mesh.h +++ b/src/mesh.h @@ -233,7 +233,7 @@ struct MeshBuilder { TR::Model &model = level.models[i]; for (int j = 0; j < model.mCount; j++) { int index = level.meshOffsets[model.mStart + j]; - if (index == -1) + if (!index && model.mStart + j > 0) continue; TR::Mesh &mesh = level.meshes[index]; iCount += (mesh.rCount * 6 + mesh.tCount * 3) * DOUBLE_SIDED; @@ -352,7 +352,7 @@ struct MeshBuilder { #endif int index = level.meshOffsets[model.mStart + j]; - if (index == -1) + if (!index && model.mStart + j > 0) continue; TR::Mesh &mesh = level.meshes[index];