engine-powered compressor sound pitch adjustment, model node angles, global settings export and diagnostics, departure permit sound enhancement, radio channel selection ai logic enhancement, door permission ai logic fix

This commit is contained in:
tmj-fstate
2020-07-16 21:32:51 +02:00
parent 3ea0d5b074
commit 0d0e299a29
15 changed files with 451 additions and 101 deletions

View File

@@ -275,9 +275,10 @@ smoke_source::location() const {
break;
}
case owner_type::node: {
// TODO: take into account node rotation
auto const rotation { glm::angleAxis( glm::radians( m_owner.node->Angles().y ), glm::vec3{ 0.f, 1.f, 0.f } ) };
location = rotation * glm::vec3{ m_offset };
auto const rotationx { glm::angleAxis( glm::radians( m_owner.node->Angles().x ), glm::vec3{ 1.f, 0.f, 0.f } ) };
auto const rotationy { glm::angleAxis( glm::radians( m_owner.node->Angles().y ), glm::vec3{ 0.f, 1.f, 0.f } ) };
auto const rotationz { glm::angleAxis( glm::radians( m_owner.node->Angles().z ), glm::vec3{ 0.f, 0.f, 1.f } ) };
location = rotationy * rotationx * rotationz * glm::vec3{ m_offset };
location += m_owner.node->location();
break;
}